diff --git a/docs/scarpet/Full.md b/docs/scarpet/Full.md index 401bdc56..241f34a5 100644 --- a/docs/scarpet/Full.md +++ b/docs/scarpet/Full.md @@ -1109,7 +1109,7 @@ for(range(1000000,1100000),check_prime(_)) => 7216 From which we can learn that there is 7216 primes between 1M and 1.1M -### `while(cond, limit)` +### `while(cond, limit,expr)` 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 diff --git a/docs/scarpet/language/LoopsAndHigherOrderFunctions.md b/docs/scarpet/language/LoopsAndHigherOrderFunctions.md index 82fdacd3..fa3ab931 100644 --- a/docs/scarpet/language/LoopsAndHigherOrderFunctions.md +++ b/docs/scarpet/language/LoopsAndHigherOrderFunctions.md @@ -49,7 +49,7 @@ for(range(1000000,1100000),check_prime(_)) => 7216 From which we can learn that there is 7216 primes between 1M and 1.1M -### `while(cond, limit)` +### `while(cond, limit, expr)` 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 @@ -145,4 +145,4 @@ it will be used from now on as a new value for the accumulator.
reduce([1,2,3,4],_a+_,0) => 10 reduce([1,2,3,4],_a*_,1) => 24 -\ No newline at end of file +