Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let rec foo2 func value list =
- match list with
- | [] -> []
- | x::xs ->
- if func = "eq" then
- if x = value then x::(foo2 func value xs)
- else foo2 func value xs
- else if func = "lt" then
- if x > value then x::(foo2 func value xs)
- else foo2 func value xs
- else if func = "gt" then
- if x < value then x::(foo2 func value xs)
- else foo2 func value xs
- else failwith "Invalid argument"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement