[pure-lang-svn] SF.net SVN: pure-lang: [270] pure/trunk/pure.1.in
Status: Beta
Brought to you by:
agraef
From: <ag...@us...> - 2008-06-20 02:49:08
|
Revision: 270 http://pure-lang.svn.sourceforge.net/pure-lang/?rev=270&view=rev Author: agraef Date: 2008-06-19 19:49:17 -0700 (Thu, 19 Jun 2008) Log Message: ----------- Fix some minor formatting glitches. Modified Paths: -------------- pure/trunk/pure.1.in Modified: pure/trunk/pure.1.in =================================================================== --- pure/trunk/pure.1.in 2008-06-20 02:07:32 UTC (rev 269) +++ pure/trunk/pure.1.in 2008-06-20 02:49:17 UTC (rev 270) @@ -432,19 +432,19 @@ conditions: .sp .nf -\fIlhs\fR = \fIrhs\fB if \fIguard\fR; - = \fIrhs\fB if \fIguard\fR; +\fIlhs\fR = \fIrhs\fP \fBif\fP \fIguard\fP; + = \fIrhs\fP \fBif\fP \fIguard\fP; ... - = \fIrhs\fB otherwise\fR; + = \fIrhs\fP \fBotherwise\fP; .fi .PP Pure also allows a collection of rules with different left-hand sides but the same right-hand side(s) to be abbreviated as follows: .sp .nf -\fIlhs\fR | +\fIlhs\fP | ... -\fIlhs\fR = \fIrhs\fB; +\fIlhs\fP = \fIrhs\fP; .fi .PP This is useful if you need different specializations of the same rule which @@ -513,8 +513,8 @@ .sp .nf > list primes -primes n = sieve (2..n) with sieve [] = []; sieve (p:qs) = p:sieve -(catmap (\eq -> if q mod p then [q] else []) qs) end; +primes n = sieve (2..n) \fBwith\fP sieve [] = []; sieve (p:qs) = p:sieve +(catmap (\eq -> if q mod p then [q] else []) qs) \fBend\fP; .fi .PP We mention in passing that list comprehensions are also a useful device to This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |