]> gitweb.factorcode.org Git - factor.git/commitdiff
Fix example in spread combinator article
authorAaron Schaefer <aaron@elasticdog.com>
Wed, 3 Dec 2008 18:26:31 +0000 (13:26 -0500)
committerAaron Schaefer <aaron@elasticdog.com>
Wed, 3 Dec 2008 18:26:31 +0000 (13:26 -0500)
core/kernel/kernel-docs.factor

index 3fc3d175a0a513af9648d07c082d90cfb674a5fc..ca18476ce567366a85eee740d83c84f7f6636d4b 100644 (file)
@@ -770,7 +770,7 @@ $nl
 "Technically, the spread combinators are redundant because they can be simulated using shuffle words and other combinators, and in addition, they do not reduce token counts by much, if at all. However, they can make code more readable by expressing intention and exploiting any inherent symmetry. For example, a piece of code which performs three operations on three related values can be written in one of two ways:"
 { $code
     "! First alternative; uses dip"
-    "[ [ 1 + ] dip 1 - dip ] 2 *"
+    "[ [ 1 + ] dip 1 - ] dip 2 *"
     "! Second alternative: uses tri*"
     "[ 1 + ] [ 1 - ] [ 2 * ] tri*"
 }