Functions Documentation |
|
Name |
match |
Syntax |
(match list var boolean-exp) -> first item that matches |
Argument List |
list: list of what you want to find a match in
var: a local variable used to store the current item in the list being checked agains the boolean expression.
boolean-exp: the expression to check the var against |
Returns |
first item that matches |
Category |
list
|
Description |
Allows one to find a match amongst a list. |
Example |
(match (list 1 2 3 4 5) itm (eq (modulo itm 2) 0)))
The above code returns 2 (it returns the first item in the list that is divisible by 2) |
Comment |
|