]> gitweb.factorcode.org Git - factor.git/commitdiff
combinators: minor improvement in usage example of case word
authorKeita Haga <keitahaga@mail.com>
Sun, 16 Jan 2011 15:25:49 +0000 (00:25 +0900)
committerKeita Haga <keitahaga@mail.com>
Sun, 16 Jan 2011 15:42:07 +0000 (00:42 +0900)
core/combinators/combinators-docs.factor

index 23ead78d94f2332d30815c2745511c0c91c77baa..9c22221e70130a1f1a8dcc3a983073adbc591980 100644 (file)
@@ -351,14 +351,16 @@ HELP: case
     { $code "dup X = [ drop Y ] [ dup Z = [ drop T ] [ no-case ] if ] if" }
 }
 { $examples
-    { $code
-        "SYMBOL: yes  SYMBOL: no  SYMBOL: maybe"
+    { $example
+        "USING: combinators io kernel ;"
+        "SYMBOLS: yes no maybe ;"
         "maybe {"
         "    { yes [ ] } ! Do nothing"
         "    { no [ \"No way!\" throw ] }"
         "    { maybe [ \"Make up your mind!\" print ] }"
         "    [ \"Invalid input; try again.\" print ]"
         "} case"
+        "Make up your mind!"
     }
 } ;