Typo fixing round
Light check over all scarpet docs Resolves #1626, resolves #1613, resolves #1597, some of the fixes are from these
This commit is contained in:
12 files changed
+34
-37
No files matched your search
@@ -53,7 +53,7 @@ From which we can learn that there is 7216 primes between 1M and 1.1M
|
||||
|
||||
Evaluates expression `expr` repeatedly until condition `cond` becomes false, but not more than `limit` times.
|
||||
Returns the result of the last `expr` evaluation, or `null` if nothing was successful. Both `expr` and `cond` will
|
||||
recveived a bound variable `_` indicating current iteration, so its a number.
|
||||
received a bound variable `_` indicating current iteration, so its a number.
|
||||
|
||||
<pre>
|
||||
while(a<100,10,a=_*_) => 81 // loop exhausted via limit
|
||||
|
||||
@@ -27,7 +27,7 @@ Highest integer that is still no larger then `n`. Insert a floor pun here.
|
||||
|
||||
### `ceil(n)`
|
||||
|
||||
First lucky integer that is not smalller than `n`. As you would expect, ceiling is typically right above the floor.
|
||||
First lucky integer that is not smaller than `n`. As you would expect, ceiling is typically right above the floor.
|
||||
|
||||
### `ln(n)`
|
||||
|
||||
|
||||
@@ -222,7 +222,7 @@ A set of assignment operators. All require bounded variable on the LHS, `<>` req
|
||||
right hand side as well (bounded, meaning being variables). Additionally they can also handle list constructors
|
||||
with all bounded variables, and work then as list assignment operators. When `+=` is used on a list, it extends
|
||||
that list of that element, and returns the list (old == new). `scarpet` doesn't support currently removal of items.
|
||||
Removal of items can be obtaine via `filter` command, and reassigning it fo the same variable. Both operations would
|
||||
Removal of items can be obtained via `filter` command, and reassigning it fo the same variable. Both operations would
|
||||
require rewriting of the array anyways.
|
||||
|
||||
<pre>
|
||||
@@ -276,7 +276,7 @@ args() -> ... [1, 2, 3]; sum(a, b, c) -> a+b+c; sum(args()) => 6
|
||||
a = ... [1, 2, 3]; sum(a, b, c) -> a+b+c; sum(a) => 6
|
||||
</pre>
|
||||
|
||||
Unpacking mechanics can be used for list and map constriction, not just for function calls.
|
||||
Unpacking mechanics can be used for list and map construction, not just for function calls.
|
||||
|
||||
<pre>
|
||||
[...range(5), pi, ...range(5,-1,-1)] => [0, 1, 2, 3, 4, 3.14159265359, 5, 4, 3, 2, 1, 0]
|
||||
|
||||
@@ -76,7 +76,7 @@ str('foo') => 'foo'
|
||||
str('3bar') => '3bar'
|
||||
str(2)+str(2) => '22'
|
||||
str('pi: %.2f',pi) => 'pi: 3.14'
|
||||
str('player at: %d %d %d',pos(player())) => 'player at: 567, -2423, 124'
|
||||
str('player at: %d, %d, %d',pos(player())) => 'player at: 567, -2423, 124'
|
||||
</pre>
|
||||
|
||||
* * *
|
||||
@@ -204,7 +204,7 @@ title('aBc') => 'Abc'
|
||||
|
||||
### `replace(string, regex, repl?); replace_first(string, regex, repl?)`
|
||||
|
||||
Replaces all, or first occurence of a regular expression in the string with `repl` expression,
|
||||
Replaces all, or first occurrence of a regular expression in the string with `repl` expression,
|
||||
or nothing, if not specified. To use escape characters (`\(`,`\+`,...), metacharacters (`\d`,`\w`,...), or position anchors (`\b`,`\z`,...) in your regular expression, use two backslashes.
|
||||
|
||||
<pre>
|
||||
|
||||
Reference in new issue
Block a user