mirror of
https://github.com/janet-lang/janet
synced 2025-04-28 13:43:19 +00:00
Update doc for thread/new and remove ws in loop's
This commit is contained in:
parent
665b1e68d5
commit
c7f382add6
@ -533,23 +533,16 @@
|
|||||||
|
|
||||||
* :iterate -- repeatedly evaluate and bind to the expression while it is
|
* :iterate -- repeatedly evaluate and bind to the expression while it is
|
||||||
truthy.
|
truthy.
|
||||||
|
|
||||||
* :range -- loop over a range. The object should be a two-element tuple with
|
* :range -- loop over a range. The object should be a two-element tuple with
|
||||||
a start and end value, and an optional positive step. The range is half
|
a start and end value, and an optional positive step. The range is half
|
||||||
open, [start, end).
|
open, [start, end).
|
||||||
|
|
||||||
* :range-to -- same as :range, but the range is inclusive [start, end].
|
* :range-to -- same as :range, but the range is inclusive [start, end].
|
||||||
|
|
||||||
* :down -- loop over a range, stepping downwards. The object should be a
|
* :down -- loop over a range, stepping downwards. The object should be a
|
||||||
two-element tuple with a start and (exclusive) end value, and an optional
|
two-element tuple with a start and (exclusive) end value, and an optional
|
||||||
(positive!) step size.
|
(positive!) step size.
|
||||||
|
|
||||||
* :down-to -- same as :down, but the range is inclusive [start, end].
|
* :down-to -- same as :down, but the range is inclusive [start, end].
|
||||||
|
|
||||||
* :keys -- iterate over the keys in a data structure.
|
* :keys -- iterate over the keys in a data structure.
|
||||||
|
|
||||||
* :pairs -- iterate over the key-value pairs as tuples in a data structure.
|
* :pairs -- iterate over the key-value pairs as tuples in a data structure.
|
||||||
|
|
||||||
* :in -- iterate over the values in a data structure or fiber.
|
* :in -- iterate over the values in a data structure or fiber.
|
||||||
|
|
||||||
`loop` also accepts conditionals to refine the looping further. Conditionals are of
|
`loop` also accepts conditionals to refine the looping further. Conditionals are of
|
||||||
|
@ -720,10 +720,10 @@ static const JanetReg threadlib_cfuns[] = {
|
|||||||
"Start a new thread that will start immediately. "
|
"Start a new thread that will start immediately. "
|
||||||
"If capacity is provided, that is how many messages can be stored in the thread's mailbox before blocking senders. "
|
"If capacity is provided, that is how many messages can be stored in the thread's mailbox before blocking senders. "
|
||||||
"The capacity must be between 1 and 65535 inclusive, and defaults to 10. "
|
"The capacity must be between 1 and 65535 inclusive, and defaults to 10. "
|
||||||
"Can optionally provide flags to the new thread - supported flags are:\n"
|
"Can optionally provide flags to the new thread - supported flags are:\n\n"
|
||||||
"\t:h - Start a heavyweight thread. This loads the core environment by default, so may use more memory initially. Messages may compress better, though.\n"
|
"* :h - Start a heavyweight thread. This loads the core environment by default, so may use more memory initially. Messages may compress better, though.\n\n"
|
||||||
"\t:a - Allow sending over registered abstract types to the new thread\n"
|
"* :a - Allow sending over registered abstract types to the new thread\n\n"
|
||||||
"\t:c - Send over cfunction information to the new thread.\n"
|
"* :c - Send over cfunction information to the new thread.\n\n"
|
||||||
"Returns a handle to the new thread.")
|
"Returns a handle to the new thread.")
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user