This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
harlowe:find [2017/10/09 20:39] 127.0.0.1 external edit |
harlowe:find [2019/04/16 01:40] (current) l |
||
---|---|---|---|
Line 28: | Line 28: | ||
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. | ||
+ | |||
+ | However, an error will NOT appear if you provide no values after the lambda - searching an empty sequence will simply | ||
+ | result in an empty array being returned. This allows you to write `(find: $lambda, ...$array)` without checking whether $array contains | ||
+ | any values (which you may not be certain of, if it contains the result of a previous (find:)). | ||
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 |