Merge branch 'doc-fixes' of git://github.com/keitahaga/factor
commit
c0de0ac15f
|
@ -32,17 +32,21 @@ HELP: casep
|
|||
{ $examples
|
||||
"The following two forms will output 1 with 0.2 probability, 2 with 0.3 probability and 3 with 0.5 probability"
|
||||
{ $code
|
||||
"USING: combinators.random ;"
|
||||
"{ { 0.2 [ 1 ] }"
|
||||
"USING: combinators.random prettyprint ;"
|
||||
"{"
|
||||
" { 0.2 [ 1 ] }"
|
||||
" { 0.3 [ 2 ] }"
|
||||
" { 0.5 [ 3 ] } } casep ."
|
||||
" { 0.5 [ 3 ] }"
|
||||
"} casep ."
|
||||
}
|
||||
$nl
|
||||
{ $code
|
||||
"USING: combinators.random ;"
|
||||
"{ { 0.2 [ 1 ] }"
|
||||
"USING: combinators.random prettyprint ;"
|
||||
"{"
|
||||
" { 0.2 [ 1 ] }"
|
||||
" { 0.3 [ 2 ] }"
|
||||
" { [ 3 ] } } casep ."
|
||||
" [ 3 ]"
|
||||
"} casep ."
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -62,17 +66,21 @@ HELP: casep*
|
|||
{ $examples
|
||||
"The following two forms will output 1 with 0.5 probability, 2 with 0.25 probability and 3 with 0.25 probability"
|
||||
{ $code
|
||||
"USING: combinators.random ;"
|
||||
"{ { 0.5 [ 1 ] }"
|
||||
"USING: combinators.random prettyprint ;"
|
||||
"{"
|
||||
" { 0.5 [ 1 ] }"
|
||||
" { 0.5 [ 2 ] }"
|
||||
" { 1 [ 3 ] } } casep* ."
|
||||
" { 1 [ 3 ] }"
|
||||
"} casep* ."
|
||||
}
|
||||
$nl
|
||||
{ $code
|
||||
"USING: combinators.random ;"
|
||||
"{ { 0.5 [ 1 ] }"
|
||||
"USING: combinators.random prettyprint ;"
|
||||
"{"
|
||||
" { 0.5 [ 1 ] }"
|
||||
" { 0.5 [ 2 ] }"
|
||||
" { [ 3 ] } } casep* ."
|
||||
" [ 3 ]"
|
||||
"} casep* ."
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -22,7 +22,11 @@ HELP: os-env
|
|||
{ $description "Looks up the value of a shell environment variable." }
|
||||
{ $examples
|
||||
"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
|
||||
|
|
|
@ -4,7 +4,7 @@ USING: help.markup help.syntax ;
|
|||
IN: io.encodings.8-bit.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" } ;
|
||||
|
||||
ARTICLE: "io.encodings.8-bit.latin9" "Latin9 encoding"
|
||||
|
|
|
@ -4,7 +4,7 @@ USING: help.markup help.syntax ;
|
|||
IN: io.encodings.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
|
||||
shift-jis
|
||||
windows-31j
|
||||
|
|
|
@ -221,7 +221,7 @@ HELP: background
|
|||
"10 iota ["
|
||||
" \"Hello world\\n\""
|
||||
" swap 10 / 1 over - over 1 <rgba>"
|
||||
" background associate format nl"
|
||||
" background associate format"
|
||||
"] each"
|
||||
}
|
||||
} ;
|
||||
|
|
|
@ -132,11 +132,11 @@ HELP: leach
|
|||
|
||||
HELP: foldl
|
||||
{ $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
|
||||
{ $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
|
||||
{ $values { "list" list } { "quot" { $quotation "( ... elt -- ... newelt )" } } { "result" "the final result" } }
|
||||
|
@ -144,7 +144,7 @@ HELP: lmap
|
|||
|
||||
HELP: lreverse
|
||||
{ $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
|
||||
{ $values { "list" list } { "array" array } }
|
||||
|
|
|
@ -46,7 +46,7 @@ HELP: all-permutations
|
|||
|
||||
HELP: each-permutation
|
||||
{ $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
|
||||
{ $values { "seq" sequence } { "permutation" sequence } }
|
||||
|
|
|
@ -32,7 +32,7 @@ $nl
|
|||
{ $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" } "." ;
|
||||
|
||||
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." ;
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ $nl
|
|||
$nl
|
||||
"Now, after some heavily editing and refactoring, the file looks like this:"
|
||||
{ $code
|
||||
"USING: namespaces ;"
|
||||
"USING: make ;"
|
||||
"IN: a"
|
||||
": hello ( -- ) \"Hello\" % ;"
|
||||
": hello-world ( -- str ) [ hello \" \" % world ] \"\" make ;"
|
||||
|
|
Loading…
Reference in New Issue