Jeff M.
2011-04-07 18:56:38 UTC
Sorry if this is somewhere on the web, but I've been google'ing my
eyes out looking and haven't found it yet...
Is there a way to compare (==), (>), (<), etc. option values without
writing my own function to do it? For example:
# Some "foo" == Some "foo" ;;
- : bool = false
# Some 10 == Some 10 ;;
- : bool = false
# None == None
- : bool = true
I assume there's a built in function like (val compare : 'a option ->
a' option -> int) that does what I'm looking for, but I haven't been
able to find it.
Thanks!
Jeff M.
eyes out looking and haven't found it yet...
Is there a way to compare (==), (>), (<), etc. option values without
writing my own function to do it? For example:
# Some "foo" == Some "foo" ;;
- : bool = false
# Some 10 == Some 10 ;;
- : bool = false
# None == None
- : bool = true
I assume there's a built in function like (val compare : 'a option ->
a' option -> int) that does what I'm looking for, but I haven't been
able to find it.
Thanks!
Jeff M.