Last active
October 10, 2015 10:00
-
-
Save seungjin/bcec4e8c11341a933c1d to your computer and use it in GitHub Desktop.
has_element function
This file contains hidden or 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
let rec has_element2 l e = | |
match l with | |
| [] -> false | |
| h::t -> h = e || has_element2 t e | |
;; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment