OCaml does not have the concept on null (in any way similar to Java or C), so it does not have to deal with it. In OCaml it is idiomatic to use Option
type to represent a value that can be either missing (None
) or contain some value (Some x
) .
OCaml does not have the concept on null (in any way similar to Java or C), so it does not have to deal with it. In OCaml it is idiomatic to use Option
type to represent a value that can be either missing (None
) or contain some value (Some x
) .