[pure-lang-svn] SF.net SVN: pure-lang:[704] pure/trunk/pure.1.in
Status: Beta
Brought to you by:
agraef
|
From: <ag...@us...> - 2008-09-04 23:01:31
|
Revision: 704
http://pure-lang.svn.sourceforge.net/pure-lang/?rev=704&view=rev
Author: agraef
Date: 2008-09-04 23:01:42 +0000 (Thu, 04 Sep 2008)
Log Message:
-----------
Update documentation.
Modified Paths:
--------------
pure/trunk/pure.1.in
Modified: pure/trunk/pure.1.in
===================================================================
--- pure/trunk/pure.1.in 2008-09-04 16:14:26 UTC (rev 703)
+++ pure/trunk/pure.1.in 2008-09-04 23:01:42 UTC (rev 704)
@@ -2020,21 +2020,15 @@
the sources, the
.B list
command can easily do it for you. For instance, here's how you can list the
-definitions of all list ``fold'' operations from the prelude in one go:
+definitions of all ``fold-left'' operations from the prelude in one go:
.sp
.nf
-> \fBlist\fP -g fold*
+> \fBlist\fP -g foldl*
foldl f a s::string = foldl f a (chars s);
foldl f a [] = a;
foldl f a (x:xs) = foldl f (f a x) xs;
foldl1 f s::string = foldl1 f (chars s);
foldl1 f (x:xs) = foldl f x xs;
-foldr f a s::string = foldr f a (chars s);
-foldr f a [] = a;
-foldr f a (x:xs) = f x (foldl (flip f) a (reverse xs));
-foldr1 f s::string = foldr1 f (chars s);
-foldr1 f [x] = x;
-foldr1 f (x:xs) = f x (foldl1 (flip f) (reverse xs));
.fi
.SH DEFINITION LEVELS
To help with incremental development, the interpreter also offers some
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|