more doc type fixes.

db4
John Benediktsson 2014-05-24 17:16:26 -07:00
parent ddea3286d9
commit 02ac0662e7
19 changed files with 105 additions and 108 deletions

View File

@ -1,4 +1,4 @@
USING: help.markup help.syntax math kernel arrays ; USING: arrays help.markup help.syntax kernel math ;
IN: 24-game IN: 24-game
HELP: 24-game HELP: 24-game
@ -48,7 +48,7 @@ HELP: makes-24?
{ "b" integer } { "b" integer }
{ "c" integer } { "c" integer }
{ "d" integer } { "d" integer }
{ "?" "a boolean" } { "?" boolean }
} }
{ $description { $description
"Tells if it is possible to win 24-game with these integers." "Tells if it is possible to win 24-game with these integers."

View File

@ -1,6 +1,6 @@
! Copyright (c) 2009 Samuel Tardieu. ! Copyright (c) 2009 Samuel Tardieu.
! See See http://factorcode.org/license.txt for BSD license. ! See See http://factorcode.org/license.txt for BSD license.
USING: help.markup help.syntax quotations sequences ; USING: help.markup help.syntax kernel quotations sequences ;
IN: backtrack IN: backtrack
HELP: fail HELP: fail
@ -32,7 +32,7 @@ HELP: if-amb
{ $values { $values
{ "true" { $quotation ( -- ? ) } } { "true" { $quotation ( -- ? ) } }
{ "false" quotation } { "false" quotation }
{ "?" "a boolean" } { "?" boolean }
} }
{ $description "Execute the first quotation and returns " { $link t } " if it returns " { $link t } " itself. If it fails with " { $link fail } " or returns " { $link f } ", then the second quotation is executed and " { $link f } " is returned." } ; { $description "Execute the first quotation and returns " { $link t } " if it returns " { $link t } " itself. If it fails with " { $link fail } " or returns " { $link f } ", then the second quotation is executed and " { $link f } " is returned." } ;

View File

@ -1,11 +1,11 @@
! Copyright (C) 2010 Chris Double. ! Copyright (C) 2010 Chris Double.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: help.markup help.syntax ; USING: help.markup help.syntax kernel math sequences strings ;
IN: bitcoin.client IN: bitcoin.client
HELP: bitcoin-server HELP: bitcoin-server
{ $values { $values
{ "string" "a string" } { "string" string }
} }
{ $description { $description
"Returns the hostname of the json-rpc server for the bitcoin client. " "Returns the hostname of the json-rpc server for the bitcoin client. "
@ -16,7 +16,7 @@ HELP: bitcoin-server
HELP: bitcoin-port HELP: bitcoin-port
{ $values { $values
{ "n" "a number" } { "n" number }
} }
{ $description { $description
"Returns the port of the json-rpc server for the bitcoin client. " "Returns the port of the json-rpc server for the bitcoin client. "
@ -27,7 +27,7 @@ HELP: bitcoin-port
HELP: bitcoin-user HELP: bitcoin-user
{ $values { $values
{ "string" "a string" } { "string" string }
} }
{ $description { $description
"Returns the username required to authenticate with the json-rpc " "Returns the username required to authenticate with the json-rpc "
@ -38,7 +38,7 @@ HELP: bitcoin-user
HELP: bitcoin-password HELP: bitcoin-password
{ $values { $values
{ "string" "a string" } { "string" string }
} }
{ $description { $description
"Returns the password required to authenticate with the json-rpc " "Returns the password required to authenticate with the json-rpc "
@ -49,8 +49,8 @@ HELP: bitcoin-password
HELP: get-addresses-by-label HELP: get-addresses-by-label
{ $values { $values
{ "label" "a string" } { "label" string }
{ "seq" "a sequence" } { "seq" sequence }
} }
{ $description { $description
"Returns the list of addresses with the given label." "Returns the list of addresses with the given label."
@ -58,7 +58,7 @@ HELP: get-addresses-by-label
HELP: get-balance HELP: get-balance
{ $values { $values
{ "n" "a number" } { "n" number }
} }
{ $description { $description
"Returns the server's available balance." "Returns the server's available balance."
@ -66,7 +66,7 @@ HELP: get-balance
HELP: get-block-count HELP: get-block-count
{ $values { $values
{ "n" "a number" } { "n" number }
} }
{ $description { $description
"Returns the number of blocks in the longest block chain." "Returns the number of blocks in the longest block chain."
@ -74,7 +74,7 @@ HELP: get-block-count
HELP: get-block-number HELP: get-block-number
{ $values { $values
{ "n" "a number" } { "n" number }
} }
{ $description { $description
"Returns the block number of the latest block in the longest block chain." "Returns the block number of the latest block in the longest block chain."
@ -82,7 +82,7 @@ HELP: get-block-number
HELP: get-connection-count HELP: get-connection-count
{ $values { $values
{ "n" "a number" } { "n" number }
} }
{ $description { $description
"Returns the number of connections to other nodes." "Returns the number of connections to other nodes."
@ -90,7 +90,7 @@ HELP: get-connection-count
HELP: get-difficulty HELP: get-difficulty
{ $values { $values
{ "n" "a number" } { "n" number }
} }
{ $description { $description
"Returns the proof-of-work difficulty as a multiple of the minimum " "Returns the proof-of-work difficulty as a multiple of the minimum "
@ -99,7 +99,7 @@ HELP: get-difficulty
HELP: get-generate HELP: get-generate
{ $values { $values
{ "?" "a boolean" } { "?" boolean }
} }
{ $description { $description
"Returns true if the server is trying to generate bitcoins, false " "Returns true if the server is trying to generate bitcoins, false "
@ -108,8 +108,8 @@ HELP: get-generate
HELP: set-generate HELP: set-generate
{ $values { $values
{ "gen" "a boolean" } { "gen" boolean }
{ "n" "a number" } { "n" number }
} }
{ $description { $description
"If 'gen' is true, the server starts generating bitcoins. If 'gen' is " "If 'gen' is true, the server starts generating bitcoins. If 'gen' is "
@ -128,8 +128,8 @@ HELP: get-info
HELP: get-label HELP: get-label
{ $values { $values
{ "address" "a string" } { "address" string }
{ "label" "a string" } { "label" string }
} }
{ $description { $description
"Returns the label associated with the given address." "Returns the label associated with the given address."
@ -137,8 +137,8 @@ HELP: get-label
HELP: set-label HELP: set-label
{ $values { $values
{ "address" "a string" } { "address" string }
{ "label" "a string" } { "label" string }
} }
{ $description { $description
"Sets the label associateed with the given address." "Sets the label associateed with the given address."
@ -146,7 +146,7 @@ HELP: set-label
HELP: remove-label HELP: remove-label
{ $values { $values
{ "address" "a string" } { "address" string }
} }
{ $description { $description
"Removes the label associated with the given address." "Removes the label associated with the given address."
@ -154,7 +154,7 @@ HELP: remove-label
HELP: get-new-address HELP: get-new-address
{ $values { $values
{ "address" "a string" } { "address" string }
} }
{ $description { $description
"Returns a new bitcoin address for receiving payments." "Returns a new bitcoin address for receiving payments."
@ -162,8 +162,8 @@ HELP: get-new-address
HELP: get-new-labelled-address HELP: get-new-labelled-address
{ $values { $values
{ "label" "a string" } { "label" string }
{ "address" "a string" } { "address" string }
} }
{ $description { $description
"Returns a new bitcoin address for receiving payments. The given " "Returns a new bitcoin address for receiving payments. The given "
@ -172,8 +172,8 @@ HELP: get-new-labelled-address
HELP: get-received-by-address HELP: get-received-by-address
{ $values { $values
{ "address" "a string" } { "address" string }
{ "amount" "a number" } { "amount" number }
} }
{ $description { $description
"Returns the total amount received by the address in transactions " "Returns the total amount received by the address in transactions "
@ -182,9 +182,9 @@ HELP: get-received-by-address
HELP: get-confirmed-received-by-address HELP: get-confirmed-received-by-address
{ $values { $values
{ "address" "a string" } { "address" string }
{ "minconf" "a number" } { "minconf" number }
{ "amount" "a number" } { "amount" number }
} }
{ $description { $description
"Returns the total amount received by the address in transactions " "Returns the total amount received by the address in transactions "
@ -193,8 +193,8 @@ HELP: get-confirmed-received-by-address
HELP: get-received-by-label HELP: get-received-by-label
{ $values { $values
{ "label" "a string" } { "label" string }
{ "amount" "a number" } { "amount" number }
} }
{ $description { $description
"Returns the total amount received by addresses with 'label' in transactions " "Returns the total amount received by addresses with 'label' in transactions "
@ -203,9 +203,9 @@ HELP: get-received-by-label
HELP: get-confirmed-received-by-label HELP: get-confirmed-received-by-label
{ $values { $values
{ "label" "a string" } { "label" string }
{ "minconf" "a number" } { "minconf" number }
{ "amount" "a number" } { "amount" number }
} }
{ $description { $description
"Returns the total amount received by the addresses with 'label' in transactions " "Returns the total amount received by the addresses with 'label' in transactions "
@ -214,9 +214,9 @@ HELP: get-confirmed-received-by-label
HELP: list-received-by-address HELP: list-received-by-address
{ $values { $values
{ "minconf" "a number" } { "minconf" number }
{ "include-empty" "a boolean" } { "include-empty" boolean }
{ "seq" "a sequence" } { "seq" sequence }
} }
{ $description { $description
"Return a sequence containing an assoc of data about the payments an " "Return a sequence containing an assoc of data about the payments an "
@ -227,9 +227,9 @@ HELP: list-received-by-address
HELP: list-received-by-label HELP: list-received-by-label
{ $values { $values
{ "minconf" "a number" } { "minconf" number }
{ "include-empty" "a boolean" } { "include-empty" boolean }
{ "seq" "a sequence" } { "seq" sequence }
} }
{ $description { $description
"Return a sequence containing an assoc of data about the payments that " "Return a sequence containing an assoc of data about the payments that "
@ -241,9 +241,9 @@ HELP: list-received-by-label
HELP: send-to-address HELP: send-to-address
{ $values { $values
{ "address" "a string" } { "address" string }
{ "amount" "a number" } { "amount" number }
{ "?" "a boolean" } { "?" boolean }
} }
{ $description { $description
"Sends 'amount' from the server's available balance to 'address'. " "Sends 'amount' from the server's available balance to 'address'. "
@ -258,9 +258,9 @@ HELP: stop
HELP: list-transactions HELP: list-transactions
{ $values { $values
{ "count" "a number" } { "count" number }
{ "include-generated" "a boolean" } { "include-generated" boolean }
{ "seq" "a sequence" } { "seq" sequence }
} }
{ $description { $description
"Return's a sequence containing up to 'count' most recent transactions." "Return's a sequence containing up to 'count' most recent transactions."

View File

@ -1,12 +1,13 @@
! Copyright (C) 2008 Doug Coleman. ! Copyright (C) 2008 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: help.markup help.syntax io.streams.string strings ; USING: help.markup help.syntax io.streams.string kernel
strings ;
IN: crypto.passwd-md5 IN: crypto.passwd-md5
HELP: authenticate-password HELP: authenticate-password
{ $values { $values
{ "shadow" string } { "password" string } { "shadow" string } { "password" string }
{ "?" "a boolean" } } { "?" boolean } }
{ $description "Encodes the provided password and compares it to the encoded password entry from a shadowed password file." } ; { $description "Encodes the provided password and compares it to the encoded password entry from a shadowed password file." } ;
HELP: parse-shadow-password HELP: parse-shadow-password

View File

@ -1,9 +1,7 @@
! Copyright (C) 2010 Erik Charlebois ! Copyright (C) 2010 Erik Charlebois
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: help.markup help.crossref help.stylesheet help.topics help.syntax USING: assocs game.models.obj.private help.markup help.syntax
definitions io prettyprint summary arrays math sequences vocabs strings io.pathnames kernel sequences strings ;
see xml.data hashtables assocs game.models.obj.private game.models
game.models.util io.pathnames ;
IN: game.models.obj IN: game.models.obj
ABOUT: "game.models.obj" ABOUT: "game.models.obj"
@ -58,7 +56,7 @@ HELP: face>aos
{ $description "Convert a face line to a sequence of vertex attributes." } ; { $description "Convert a face line to a sequence of vertex attributes." } ;
HELP: push* HELP: push*
{ $values { "elt" "an object" } { "seq" sequence } } { $values { "elt" object } { "seq" sequence } }
{ $description "Push the value onto the sequence, keeping the sequence on the stack." } ; { $description "Push the value onto the sequence, keeping the sequence on the stack." } ;
HELP: push-current-model HELP: push-current-model

View File

@ -3,7 +3,7 @@ USING: help.markup help.syntax sequences splitting strings ;
IN: grouping.extras IN: grouping.extras
HELP: group-by HELP: group-by
{ $values { "seq" "a sequence" } { "quot" { $quotation ( elt -- key ) } } { "groups" "a new assoc" } } { $values { "seq" sequence } { "quot" { $quotation ( elt -- key ) } } { "groups" "a new assoc" } }
{ $description "Groups the elements by the key received by applying quot to each element in the sequence." } { $description "Groups the elements by the key received by applying quot to each element in the sequence." }
{ $examples { $examples
{ $example { $example

View File

@ -1,4 +1,4 @@
USING: help.markup help.syntax kernel math ; USING: help.markup help.syntax kernel math strings ;
IN: hashcash IN: hashcash
ARTICLE: "hashcash" "Hashcash" ARTICLE: "hashcash" "Hashcash"
@ -31,7 +31,7 @@ $nl
{ mint mint* <hashcash> check-stamp salt } related-words { mint mint* <hashcash> check-stamp salt } related-words
HELP: mint HELP: mint
{ $values { "resource" "a string" } { "stamp" "generated stamp" } } { $values { "resource" string } { "stamp" "generated stamp" } }
{ $description "This word generate a valid stamp with default parameters and the specified resource." } ; { $description "This word generate a valid stamp with default parameters and the specified resource." } ;
HELP: mint* HELP: mint*
@ -39,11 +39,11 @@ HELP: mint*
{ $description "As " { $snippet "mint" } " but it takes an hashcash tuple as a parameter." } ; { $description "As " { $snippet "mint" } " but it takes an hashcash tuple as a parameter." } ;
HELP: check-stamp HELP: check-stamp
{ $values { "stamp" "a string" } { "?" boolean } } { $values { "stamp" string } { "?" boolean } }
{ $description "Check for stamp's validity. Only supports hashcash version 1." } ; { $description "Check for stamp's validity. Only supports hashcash version 1." } ;
HELP: salt HELP: salt
{ $values { "length" integer } { "salted" "a string" } } { $values { "length" integer } { "salted" string } }
{ $description "It generates a random string of " { $snippet "length" } " characters." } ; { $description "It generates a random string of " { $snippet "length" } " characters." } ;
HELP: <hashcash> HELP: <hashcash>

View File

@ -65,7 +65,7 @@ HELP: capabilities
{ $description "Fetches the advertised extensions of the IMAP server." } ; { $description "Fetches the advertised extensions of the IMAP server." } ;
HELP: list-folders HELP: list-folders
{ $values { "directory" string } { "folders" "a sequence" } } { $values { "directory" string } { "folders" sequence } }
{ $description "Lists all folders in " { $snippet "directory" } ". Folders is a sequence of 3-tuples with the attributes, root and name of each folder matched." } ; { $description "Lists all folders in " { $snippet "directory" } ". Folders is a sequence of 3-tuples with the attributes, root and name of each folder matched." } ;
HELP: select-folder HELP: select-folder

View File

@ -1,6 +1,6 @@
USING: help.markup help.syntax ; USING: help.markup help.syntax math ;
IN: math.algebra IN: math.algebra
HELP: chinese-remainder HELP: chinese-remainder
{ $values { "aseq" "a sequence of integers" } { "nseq" "a sequence of positive integers" } { "x" "an integer" } } { $values { "aseq" "a sequence of integers" } { "nseq" "a sequence of positive integers" } { "x" integer } }
{ $description "If " { $snippet "nseq" } " integers are pairwise coprimes, " { $snippet "x" } " is the smallest positive integer congruent to each element in " { $snippet "aseq" } " modulo the corresponding element in " { $snippet "nseq" } "." } ; { $description "If " { $snippet "nseq" } " integers are pairwise coprimes, " { $snippet "x" } " is the smallest positive integer congruent to each element in " { $snippet "aseq" } " modulo the corresponding element in " { $snippet "nseq" } "." } ;

View File

@ -116,7 +116,7 @@ HELP: n*V+V
{ $description "Calculate the vector sum " { $snippet "αx + y" } " and return a freshly-allocated vector with the same length as " { $snippet "x" } " and " { $snippet "y" } " containing the result. Corresponds to the xAXPY routines in BLAS." } ; { $description "Calculate the vector sum " { $snippet "αx + y" } " and return a freshly-allocated vector with the same length as " { $snippet "x" } " and " { $snippet "y" } " containing the result. Corresponds to the xAXPY routines in BLAS." } ;
HELP: n*V HELP: n*V
{ $values { "alpha" "a number" } { "x" blas-vector-base } { "alpha*x" blas-vector-base } } { $values { "alpha" number } { "x" blas-vector-base } { "alpha*x" blas-vector-base } }
{ $description "Calculate the scalar-vector product " { $snippet "αx" } " and return a freshly-allocated vector with the same length as " { $snippet "x" } " containing the result. Corresponds to the xSCAL routines in BLAS." } ; { $description "Calculate the scalar-vector product " { $snippet "αx" } " and return a freshly-allocated vector with the same length as " { $snippet "x" } " containing the result. Corresponds to the xSCAL routines in BLAS." } ;
HELP: V+ HELP: V+

View File

@ -1,14 +1,14 @@
! Copyright (C) 2008 John Benediktsson, Doug Coleman. ! Copyright (C) 2008 John Benediktsson, Doug Coleman.
! See http://factorcode.org/license.txt for BSD license ! See http://factorcode.org/license.txt for BSD license
USING: help.markup help.syntax math ; USING: help.markup help.syntax math sequences ;
IN: math.finance IN: math.finance
HELP: sma HELP: sma
{ $values { "seq" "a sequence" } { "n" "number of periods" } { "newseq" "a sequence" } } { $values { "seq" sequence } { "n" "number of periods" } { "newseq" sequence } }
{ $description "Returns the Simple Moving Average with the specified periodicity." } ; { $description "Returns the Simple Moving Average with the specified periodicity." } ;
HELP: ema HELP: ema
{ $values { "seq" "a sequence" } { "n" "number of periods" } { "newseq" "a sequence" } } { $values { "seq" sequence } { "n" "number of periods" } { "newseq" sequence } }
{ $description { $description
"Returns the Exponential Moving Average with the specified periodicity, calculated by:\n" "Returns the Exponential Moving Average with the specified periodicity, calculated by:\n"
{ $list { $list
@ -17,14 +17,14 @@ HELP: ema
} ; } ;
HELP: macd HELP: macd
{ $values { "seq" "a sequence" } { "n1" "short number of periods" } { "n2" "long number of periods" } { "newseq" "a sequence" } } { $values { "seq" sequence } { "n1" "short number of periods" } { "n2" "long number of periods" } { "newseq" sequence } }
{ $description { $description
"Returns the Moving Average Converge of the sequence, calculated by:\n" "Returns the Moving Average Converge of the sequence, calculated by:\n"
{ $list "MACD[t] = EMA2[t] - EMA1[t]" } { $list "MACD[t] = EMA2[t] - EMA1[t]" }
} ; } ;
HELP: momentum HELP: momentum
{ $values { "seq" "a sequence" } { "n" "number of periods" } { "newseq" "a sequence" } } { $values { "seq" sequence } { "n" "number of periods" } { "newseq" sequence } }
{ $description { $description
"Returns the Momentum of the sequence, calculated by:\n" "Returns the Momentum of the sequence, calculated by:\n"
{ $list "MOM[t] = SEQ[t] - SEQ[t-n]" } { $list "MOM[t] = SEQ[t] - SEQ[t-n]" }

View File

@ -1,4 +1,4 @@
USING: help.markup help.syntax ; USING: help.markup help.syntax math ;
IN: math.primes.lists IN: math.primes.lists
HELP: lprimes HELP: lprimes
@ -6,5 +6,5 @@ HELP: lprimes
{ $description "Return a sorted list containing all the prime numbers." } ; { $description "Return a sorted list containing all the prime numbers." } ;
HELP: lprimes-from HELP: lprimes-from
{ $values { "n" "an integer" } { "list" "a lazy list" } } { $values { "n" integer } { "list" "a lazy list" } }
{ $description "Return a sorted list containing all the prime numbers greater or equal to " { $snippet "n" } "." } ; { $description "Return a sorted list containing all the prime numbers greater or equal to " { $snippet "n" } "." } ;

View File

@ -1,6 +1,6 @@
USING: help.markup help.syntax ; USING: help.markup help.syntax math strings ;
IN: math.text.french IN: math.text.french
HELP: number>text HELP: number>text
{ $values { "n" "an integer" } { "str" "a string" } } { $values { "n" integer } { "str" string } }
{ $description "Return the a string describing " { $snippet "n" } " in French. Numbers with absolute value equal to or greater than 10^12 will be returned using their numeric representation." } ; { $description "Return the a string describing " { $snippet "n" } " in French. Numbers with absolute value equal to or greater than 10^12 will be returned using their numeric representation." } ;

View File

@ -1,6 +1,6 @@
USING: help.markup help.syntax ; USING: help.markup help.syntax sequences ;
IN: math.text.utils IN: math.text.utils
HELP: digit-groups HELP: digit-groups
{ $values { "n" "a positive integer" } { "k" "a positive integer" } { "seq" "a sequence" } } { $values { "n" "a positive integer" } { "k" "a positive integer" } { "seq" sequence } }
{ $description "Decompose a number into groups of " { $snippet "k" } " digits and return them in a sequence starting with the least significant grouped digits first." } ; { $description "Decompose a number into groups of " { $snippet "k" } " digits and return them in a sequence starting with the least significant grouped digits first." } ;

View File

@ -1,6 +1,6 @@
! Copyright (C) 2010 Samuel Tardieu. ! Copyright (C) 2010 Samuel Tardieu.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: help.markup help.syntax assocs ; USING: assocs help.markup help.syntax math sequences ;
IN: path-finding IN: path-finding
{ <astar> <bfs> <dijkstra> } related-words { <astar> <bfs> <dijkstra> } related-words
@ -15,7 +15,7 @@ HELP: cost
{ "from" "a node" } { "from" "a node" }
{ "to" "a node" } { "to" "a node" }
{ "astar" "an instance of a subclassed " { $link astar } " tuple" } { "astar" "an instance of a subclassed " { $link astar } " tuple" }
{ "n" "a number" } { "n" number }
} }
{ $description "Return the cost to go from " { $snippet "from" } " to " { $snippet "to" } ". " { $description "Return the cost to go from " { $snippet "from" } " to " { $snippet "to" } ". "
{ $snippet "to" } " is necessarily a neighbour of " { $snippet "from" } "." { $snippet "to" } " is necessarily a neighbour of " { $snippet "from" } "."
@ -26,7 +26,7 @@ HELP: heuristic
{ "from" "a node" } { "from" "a node" }
{ "to" "a node" } { "to" "a node" }
{ "astar" "an instance of a subclassed " { $link astar } " tuple" } { "astar" "an instance of a subclassed " { $link astar } " tuple" }
{ "n" "a number" } { "n" number }
} }
{ $description "Return the estimated (undervalued) cost to go from " { $snippet "from" } " to " { $snippet "to" } ". " { $description "Return the estimated (undervalued) cost to go from " { $snippet "from" } " to " { $snippet "to" } ". "
{ $snippet "from" } " and " { $snippet "to" } " are not necessarily neighbours." { $snippet "from" } " and " { $snippet "to" } " are not necessarily neighbours."
@ -92,7 +92,7 @@ HELP: find-path
HELP: considered HELP: considered
{ $values { $values
{ "astar" astar } { "astar" astar }
{ "considered" "a sequence" } { "considered" sequence }
} }
{ $description "When called after a call to " { $link find-path } ", return a list of nodes " { $description "When called after a call to " { $link find-path } ", return a list of nodes "
"which have been examined during the A* exploration." "which have been examined during the A* exploration."

View File

@ -1,14 +1,14 @@
! Copyright (C) 2007 Chris Double. ! Copyright (C) 2007 Chris Double.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: help.markup help.syntax ; USING: help.markup help.syntax strings ;
IN: peg.javascript IN: peg.javascript
HELP: parse-javascript HELP: parse-javascript
{ $values { $values
{ "string" "a string" } { "string" string }
{ "ast" "a JavaScript abstract syntax tree" } { "ast" "a JavaScript abstract syntax tree" }
} }
{ $description { $description
"Parse the input string using the JavaScript parser. Throws an error if " "Parse the input string using the JavaScript parser. Throws an error if "
"the string does not contain valid JavaScript. Returns the abstract syntax tree " "the string does not contain valid JavaScript. Returns the abstract syntax tree "
"if successful." } ; "if successful." } ;

View File

@ -1,6 +1,6 @@
! Copyright (C) 2009 Chris Double. ! Copyright (C) 2009 Chris Double.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: help.markup help.syntax ; USING: assocs help.markup help.syntax kernel strings ;
IN: s3 IN: s3
HELP: buckets HELP: buckets
@ -16,7 +16,7 @@ HELP: buckets
HELP: create-bucket HELP: create-bucket
{ $values { $values
{ "bucket" "a string" } { "bucket" string }
} }
{ $description { $description
"Creates a bucket with the given name." "Creates a bucket with the given name."
@ -28,7 +28,7 @@ HELP: create-bucket
HELP: delete-bucket HELP: delete-bucket
{ $values { $values
{ "bucket" "a string" } { "bucket" string }
} }
{ $description { $description
"Deletes the bucket with the given name." "Deletes the bucket with the given name."
@ -40,7 +40,7 @@ HELP: delete-bucket
HELP: keys HELP: keys
{ $values { $values
{ "bucket" "a string" } { "bucket" string }
{ "seq" "a sequence of " { $link key } " objects"} { "seq" "a sequence of " { $link key } " objects"}
} }
{ $description { $description
@ -53,10 +53,10 @@ HELP: keys
HELP: get-object HELP: get-object
{ $values { $values
{ "bucket" "a string" } { "bucket" string }
{ "key" "a string" } { "key" string }
{ "response" "The HTTP response object"} { "response" "The HTTP response object"}
{ "data" "The data returned from the http request"} { "data" "The data returned from the http request"}
} }
{ $description { $description
"Does an HTTP request to retrieve the object in the bucket with the given key." "Does an HTTP request to retrieve the object in the bucket with the given key."
@ -67,12 +67,12 @@ HELP: get-object
; ;
HELP: put-object HELP: put-object
{ $values { $values
{ "data" "an object" } { "data" object }
{ "mime-type" "a string" } { "mime-type" string }
{ "bucket" "a string"} { "bucket" string }
{ "key" "a string"} { "key" string }
{ "headers" "an assoc"} { "headers" assoc }
} }
{ $description { $description
"Stores the object under the key in the given bucket. The object has " "Stores the object under the key in the given bucket. The object has "
@ -90,8 +90,8 @@ HELP: put-object
HELP: delete-object HELP: delete-object
{ $values { $values
{ "bucket" "a string"} { "bucket" string }
{ "key" "a string"} { "key" string }
} }
{ $description { $description
"Deletes the object in the bucket with the given key." "Deletes the object in the bucket with the given key."

View File

@ -1,11 +1,9 @@
USING: arrays help.markup help.syntax math USING: help.markup help.syntax math sequences ;
sequences.private vectors strings kernel math.order layouts
quotations generic.single ;
IN: sequences.extras IN: sequences.extras
HELP: subseq* HELP: subseq*
{ $values { $values
{ "from" "an integer" } { "to" "an integer" } { "seq" "sequence" } { "subseq" "sequence" } } { "from" integer } { "to" integer } { "seq" sequence } { "subseq" sequence } }
{ $description "Outputs a new sequence using positions relative to one or both ends of the sequence. Positive values describes offsets relative to the start of the sequence, negative values relative to the end. Values of " { $link f } " for " { $snippet "from" } " indicate the beginning of the sequence, while an " { $link f } " for " { $snippet "to" } " indicates the end of the sequence." } { $description "Outputs a new sequence using positions relative to one or both ends of the sequence. Positive values describes offsets relative to the start of the sequence, negative values relative to the end. Values of " { $link f } " for " { $snippet "from" } " indicate the beginning of the sequence, while an " { $link f } " for " { $snippet "to" } " indicates the end of the sequence." }
{ $notes "Both " { $snippet "from" } " and " { $snippet "to" } " can be safely set to values outside the length of the sequence. Also, " { $snippet "from" } " can safely reference a smaller or greater index position than " { $snippet "to" } "." } { $notes "Both " { $snippet "from" } " and " { $snippet "to" } " can be safely set to values outside the length of the sequence. Also, " { $snippet "from" } " can safely reference a smaller or greater index position than " { $snippet "to" } "." }
{ $examples { $examples

View File

@ -2,15 +2,15 @@ USING: help.markup help.syntax sequences splitting strings ;
IN: splitting.extras IN: splitting.extras
HELP: split*-when HELP: split*-when
{ $values { "seq" "a sequence" } { "quot" { $quotation ( ... elt -- ... ? ) } } { "pieces" "a new array" } } { $values { "seq" sequence } { "quot" { $quotation ( ... elt -- ... ? ) } } { "pieces" "a new array" } }
{ $description "A variant of " { $link split-when } " that includes the elements along which the sequence was split." } { $description "A variant of " { $link split-when } " that includes the elements along which the sequence was split." }
{ $examples { $example "USING: ascii kernel prettyprint splitting.extras ;" "\"hello,world-how.are:you\" [ letter? not ] split*-when ." "{ \"hello\" \",\" \"world\" \"-\" \"how\" \".\" \"are\" \":\" \"you\" }" } } ; { $examples { $example "USING: ascii kernel prettyprint splitting.extras ;" "\"hello,world-how.are:you\" [ letter? not ] split*-when ." "{ \"hello\" \",\" \"world\" \"-\" \"how\" \".\" \"are\" \":\" \"you\" }" } } ;
HELP: split* HELP: split*
{ $values { "seq" "a sequence" } { "separators" "a sequence" } { "pieces" "a new array" } } { $values { "seq" sequence } { "separators" sequence } { "pieces" "a new array" } }
{ $description "A variant of " { $link split } " that includes the elements along which the sequence was split." } { $description "A variant of " { $link split } " that includes the elements along which the sequence was split." }
{ $examples { $example "USING: prettyprint splitting.extras ;" "\"hello world-how are you?\" \" -\" split* ." "{ \"hello\" \" \" \"world\" \"-\" \"how\" \" \" \"are\" \" \" \"you?\" }" } } ; { $examples { $example "USING: prettyprint splitting.extras ;" "\"hello world-how are you?\" \" -\" split* ." "{ \"hello\" \" \" \"world\" \"-\" \"how\" \" \" \"are\" \" \" \"you?\" }" } } ;
HELP: split-find HELP: split-find
{ $values { "seq" "a sequence" } { "quot" { $quotation ( seq -- i ) } } { "pieces" "a new array" } } { $values { "seq" sequence } { "quot" { $quotation ( seq -- i ) } } { "pieces" "a new array" } }
{ $description "Splits a sequence into slices using the provided quotation to find split points." } ; { $description "Splits a sequence into slices using the provided quotation to find split points." } ;