Merge branch 'doc-fixes' of git://github.com/keitahaga/factor

db4
Slava Pestov 2011-02-25 22:37:39 -08:00
commit c0de0ac15f
10 changed files with 53 additions and 41 deletions

View File

@ -32,17 +32,21 @@ HELP: casep
{ $examples { $examples
"The following two forms will output 1 with 0.2 probability, 2 with 0.3 probability and 3 with 0.5 probability" "The following two forms will output 1 with 0.2 probability, 2 with 0.3 probability and 3 with 0.5 probability"
{ $code { $code
"USING: combinators.random ;" "USING: combinators.random prettyprint ;"
"{ { 0.2 [ 1 ] }" "{"
" { 0.2 [ 1 ] }"
" { 0.3 [ 2 ] }" " { 0.3 [ 2 ] }"
" { 0.5 [ 3 ] } } casep ." " { 0.5 [ 3 ] }"
"} casep ."
} }
$nl $nl
{ $code { $code
"USING: combinators.random ;" "USING: combinators.random prettyprint ;"
"{ { 0.2 [ 1 ] }" "{"
" { 0.2 [ 1 ] }"
" { 0.3 [ 2 ] }" " { 0.3 [ 2 ] }"
" { [ 3 ] } } casep ." " [ 3 ]"
"} casep ."
} }
} }
@ -62,17 +66,21 @@ HELP: casep*
{ $examples { $examples
"The following two forms will output 1 with 0.5 probability, 2 with 0.25 probability and 3 with 0.25 probability" "The following two forms will output 1 with 0.5 probability, 2 with 0.25 probability and 3 with 0.25 probability"
{ $code { $code
"USING: combinators.random ;" "USING: combinators.random prettyprint ;"
"{ { 0.5 [ 1 ] }" "{"
" { 0.5 [ 1 ] }"
" { 0.5 [ 2 ] }" " { 0.5 [ 2 ] }"
" { 1 [ 3 ] } } casep* ." " { 1 [ 3 ] }"
"} casep* ."
} }
$nl $nl
{ $code { $code
"USING: combinators.random ;" "USING: combinators.random prettyprint ;"
"{ { 0.5 [ 1 ] }" "{"
" { 0.5 [ 1 ] }"
" { 0.5 [ 2 ] }" " { 0.5 [ 2 ] }"
" { [ 3 ] } } casep* ." " [ 3 ]"
"} casep* ."
} }
} }

View File

@ -22,7 +22,11 @@ HELP: os-env
{ $description "Looks up the value of a shell environment variable." } { $description "Looks up the value of a shell environment variable." }
{ $examples { $examples
"This is an operating system-specific feature. On Unix, you can do:" "This is an operating system-specific feature. On Unix, you can do:"
{ $unchecked-example "\"USER\" os-env print" "jane" } { $unchecked-example
"USING: environment io ;"
"\"USER\" os-env print"
"jane"
}
} ; } ;
HELP: os-envs HELP: os-envs

View File

@ -4,7 +4,7 @@ USING: help.markup help.syntax ;
IN: io.encodings.8-bit.latin9 IN: io.encodings.8-bit.latin9
HELP: latin9 HELP: latin9
{ $var-description "This is the ISO-8859-15 encoding, also called Latin-9 and unoffically as Latin-0. It is an 8-bit superset of ASCII designed as a modification of Latin-1, removing little-used characters in favor of the Euro symbol and other characters." } { $var-description "This is the ISO-8859-15 encoding, also called Latin-9 and unofficially as Latin-0. It is an 8-bit superset of ASCII designed as a modification of Latin-1, removing little-used characters in favor of the Euro symbol and other characters." }
{ $see-also "encodings-introduction" } ; { $see-also "encodings-introduction" } ;
ARTICLE: "io.encodings.8-bit.latin9" "Latin9 encoding" ARTICLE: "io.encodings.8-bit.latin9" "Latin9 encoding"

View File

@ -4,7 +4,7 @@ USING: help.markup help.syntax ;
IN: io.encodings.shift-jis IN: io.encodings.shift-jis
ARTICLE: "io.encodings.shift-jis" "Shift JIS" ARTICLE: "io.encodings.shift-jis" "Shift JIS"
"Shift JIS is a text encoding for Japanese. There are multiple versions, depending on whether the offical standard or the modified Microsoft version is required." "Shift JIS is a text encoding for Japanese. There are multiple versions, depending on whether the official standard or the modified Microsoft version is required."
{ $subsections { $subsections
shift-jis shift-jis
windows-31j windows-31j

View File

@ -221,7 +221,7 @@ HELP: background
"10 iota [" "10 iota ["
" \"Hello world\\n\"" " \"Hello world\\n\""
" swap 10 / 1 over - over 1 <rgba>" " swap 10 / 1 over - over 1 <rgba>"
" background associate format nl" " background associate format"
"] each" "] each"
} }
} ; } ;

View File

@ -132,11 +132,11 @@ HELP: leach
HELP: foldl HELP: foldl
{ $values { "list" list } { "identity" "an object" } { "quot" { $quotation "( ... prev elt -- ... next )" } } { "result" "the final result" } } { $values { "list" list } { "identity" "an object" } { "quot" { $quotation "( ... prev elt -- ... next )" } } { "result" "the final result" } }
{ $description "Combines successive elements of the list (in a left-assocative order) using a binary operation and outputs the final result." } ; { $description "Combines successive elements of the list (in a left-associative order) using a binary operation and outputs the final result." } ;
HELP: foldr HELP: foldr
{ $values { "list" list } { "identity" "an object" } { "quot" { $quotation "( ... prev elt -- ... next )" } } { "result" "the final result" } } { $values { "list" list } { "identity" "an object" } { "quot" { $quotation "( ... prev elt -- ... next )" } } { "result" "the final result" } }
{ $description "Combines successive elements of the list (in a right-assocative order) using a binary operation, and outputs the final result." } ; { $description "Combines successive elements of the list (in a right-associative order) using a binary operation, and outputs the final result." } ;
HELP: lmap HELP: lmap
{ $values { "list" list } { "quot" { $quotation "( ... elt -- ... newelt )" } } { "result" "the final result" } } { $values { "list" list } { "quot" { $quotation "( ... elt -- ... newelt )" } } { "result" "the final result" } }
@ -144,7 +144,7 @@ HELP: lmap
HELP: lreverse HELP: lreverse
{ $values { "list" list } { "newlist" list } } { $values { "list" list } { "newlist" list } }
{ $description "Reverses the input list, outputing a new, reversed list. The output is a strict cons list." } ; { $description "Reverses the input list, outputting a new, reversed list. The output is a strict cons list." } ;
HELP: list>array HELP: list>array
{ $values { "list" list } { "array" array } } { $values { "list" list } { "array" array } }

View File

@ -127,7 +127,7 @@ TUPLE: counter adder subtractor ;
<counter> <counter>
[ adder>> call . ] [ adder>> call . ]
[ adder>> call . ] [ adder>> call . ]
[ subtractor>> call . ] tri """ [ subtractor>> call . ] tri"""
"""1 """1
2 2
1""" 1"""

View File

@ -46,7 +46,7 @@ HELP: all-permutations
HELP: each-permutation HELP: each-permutation
{ $values { "seq" sequence } { "quot" { $quotation "( seq -- )" } } } { $values { "seq" sequence } { "quot" { $quotation "( seq -- )" } } }
{ $description "Applies the quotation to each permuation of " { $snippet "seq" } " in order." } ; { $description "Applies the quotation to each permutation of " { $snippet "seq" } " in order." } ;
HELP: inverse-permutation HELP: inverse-permutation
{ $values { "seq" sequence } { "permutation" sequence } } { $values { "seq" sequence } { "permutation" sequence } }

View File

@ -32,7 +32,7 @@ $nl
{ $heading "Implementation" } { $heading "Implementation" }
"Listeners are instances of " { $link listener-gadget } ". The listener consists of an output area (instance of " { $link pane } ") and an input area (instance of " { $link interactor } "). Clickable presentations can also be printed to the listener; see " { $link "ui-presentations" } "." ; "Listeners are instances of " { $link listener-gadget } ". The listener consists of an output area (instance of " { $link pane } ") and an input area (instance of " { $link interactor } "). Clickable presentations can also be printed to the listener; see " { $link "ui-presentations" } "." ;
TIP: "You can read documentation by pressing F1." ; TIP: "You can read documentation by pressing " { $snippet "F1" } "." ;
TIP: "The listener tool remembers previous lines of input. Press " { $command interactor "completion" recall-previous } " and " { $command interactor "completion" recall-next } " to cycle through them." ; TIP: "The listener tool remembers previous lines of input. Press " { $command interactor "completion" recall-previous } " and " { $command interactor "completion" recall-next } " to cycle through them." ;

View File

@ -34,7 +34,7 @@ $nl
$nl $nl
"Now, after some heavily editing and refactoring, the file looks like this:" "Now, after some heavily editing and refactoring, the file looks like this:"
{ $code { $code
"USING: namespaces ;" "USING: make ;"
"IN: a" "IN: a"
": hello ( -- ) \"Hello\" % ;" ": hello ( -- ) \"Hello\" % ;"
": hello-world ( -- str ) [ hello \" \" % world ] \"\" make ;" ": hello-world ( -- str ) [ hello \" \" % world ] \"\" make ;"