This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
harlowe:all-pass [2017/10/09 20:39] 127.0.0.1 external edit |
harlowe:all-pass [2019/04/16 01:38] (current) l |
||
---|---|---|---|
Line 1: | Line 1: | ||
**(all-pass: // [[harlowe:Lambda|lambda]], ...Any//) -> //[[harlowe:Boolean|boolean]]//** | **(all-pass: // [[harlowe:Lambda|lambda]], ...Any//) -> //[[harlowe:Boolean|boolean]]//** | ||
- | This takes a "where" [[harlowe:lambda|lambda]] and a series of values, and evaluates to true if the lambda, when run using each value, always evaluated to true. | + | This takes a "where" [[harlowe:lambda|lambda]] and a series of values, and evaluates to true if the lambda, when run using each value, never evaluated to false. |
=== Example usage: === | === Example usage: === | ||
Line 20: | Line 20: | ||
Of course, if any condition should cause an error, such as checking if a number contains a number, then the error will appear. | Of course, if any condition should cause an error, such as checking if a number contains a number, then the error will appear. | ||
+ | |||
+ | If zero values are given to (all-pass:), then it will return true by default. | ||
The temp variable, which you can name anything you want, is controlled entirely by the lambda - it doesn't exist | The temp variable, which you can name anything you want, is controlled entirely by the lambda - it doesn't exist |