Skip to content

Commit

Permalink
Update 2024-06-22-ten-reasons-i-love-ocaml.md
Browse files Browse the repository at this point in the history
  • Loading branch information
lwcarani committed Jul 5, 2024
1 parent cb1e951 commit 9939b7d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion _posts/2024-06-22-ten-reasons-i-love-ocaml.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ let rec depth t =

## 5. No null value

By design, OCaml does not include a `null` or `nil` value. Instead, OCaml has `Option`, which is like a box that either contains `Some` value, or `None`. Idiomatically, we use pattern matching to check and "unwrap" the contents of the "box". We can uses this to gracefully handle things like possibly empty lists, in a very readable format:
By design, OCaml does not include a `null` or `nil` value. Instead, OCaml has `Option`, which is like a box that either contains `Some` value, or `None`. Idiomatically, we use pattern matching to check and "unwrap" the contents of the "box". We can uses this to gracefully handle things like possibly empty lists, in a very readable format:

```ocaml
(** [extract o] converts the int option to a string value
Expand Down

0 comments on commit 9939b7d

Please sign in to comment.