Hi,
in a small presentation of OCaml (Linux User Group Bremen) I got
some interesting questions, and
trying to answer I noticed I took something for granted that was
not fully understood.
Looking at this in the toplevel:
# let () = () ;;
# () ;;
- : unit = ()
# let _ = () ;;
- : unit = ()
# let None = None;;
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a value that is not matched:
Some _
#
... the question is: okay, pattern matching left of the equal
sign, but what does it define?
It defines unit and None in the environment, and then that value
is just sitting there?
/Str.