[pure-lang-svn] SF.net SVN: pure-lang: [150] pure/trunk
Status: Beta
Brought to you by:
agraef
From: <ag...@us...> - 2008-05-28 03:56:09
|
Revision: 150 http://pure-lang.svn.sourceforge.net/pure-lang/?rev=150&view=rev Author: agraef Date: 2008-05-27 20:56:18 -0700 (Tue, 27 May 2008) Log Message: ----------- Overhaul of prelude. Modified Paths: -------------- pure/trunk/lib/strings.pure pure/trunk/test/prelude.log Modified: pure/trunk/lib/strings.pure =================================================================== --- pure/trunk/lib/strings.pure 2008-05-28 03:55:48 UTC (rev 149) +++ pure/trunk/lib/strings.pure 2008-05-28 03:56:18 UTC (rev 150) @@ -140,6 +140,9 @@ /* Define the customary list operations on strings, so that these can mostly be used as if they were lists. */ +list s::string = chars s; +tuple s::string = tuple (chars s); + reverse s::string = strcat (reverse (chars s)); cat (s::string:xs) = cat (chars s:xs); Modified: pure/trunk/test/prelude.log =================================================================== --- pure/trunk/test/prelude.log 2008-05-28 03:55:48 UTC (rev 149) +++ pure/trunk/test/prelude.log 2008-05-28 03:56:18 UTC (rev 150) @@ -293,6 +293,8 @@ <var> state 1 state 1: #0 } end if not null delim/*0:01*/; +list s/*0:1*/::string = chars s/*0:1*/; +tuple s/*0:1*/::string = tuple (chars s/*0:1*/); reverse s/*0:1*/::string = strcat (reverse (chars s/*0:1*/)); cat (s/*0:101*/::string:xs/*0:11*/) = cat (chars s/*0:101*/:xs/*0:11*/); cycle n/*0:01*/::int "" = ""; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |