-
-
Save leo60228/ab68f365a10f6c218a31a3a7b7882280 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(fn first [pred iter inv control] | |
(let [(control value) (iter inv control)] | |
(if (= value nil) | |
nil | |
(pred value) | |
value | |
(first pred iter inv control)))) | |
(fn even [x] | |
(= (% x 2) 0)) | |
(print (first even (ipairs [1 2 3]))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment