[pure-lang-svn] SF.net SVN: pure-lang:[755] pure/trunk/pure.1.in
Status: Beta
Brought to you by:
agraef
From: <ag...@us...> - 2008-09-11 23:16:50
|
Revision: 755 http://pure-lang.svn.sourceforge.net/pure-lang/?rev=755&view=rev Author: agraef Date: 2008-09-11 23:17:01 +0000 (Thu, 11 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-11 22:06:53 UTC (rev 754) +++ pure/trunk/pure.1.in 2008-09-11 23:17:01 UTC (rev 755) @@ -857,7 +857,8 @@ .fi .PP (Conversely, you can also turn a list into a stream value with the `stream' -function.) +function. This is done less frequently, but becomes useful if you want to +generate a stream from a finite list in a list comprehension.) .PP For interactive usage it's often convenient to define an eager variation of `take' which combines `take' and `list'. Let's do this now, so that we can use @@ -999,12 +1000,12 @@ .sp .nf all_primes = sieve (2..inf) \fBwith\fP - sieve [] = []; sieve (p:qs) = p : sieve [q; q = qs; q mod p] &; \fBend\fP; .fi .sp -Example: +Note that we can omit the empty list case of `sieve' here, since the sieve now +never becomes empty. Example: .sp .nf > \fBlet\fP P = all_primes; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |