From 9cdf8ca4bf3b45def023b4157dfc202b338f4d8e Mon Sep 17 00:00:00 2001 From: Janis Hutz Date: Mon, 21 Sep 2026 16:53:58 +0200 Subject: [PATCH] [CD] Add tuples to OCAML notes --- core/cd/summary/code/ocaml/00_basics.ml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/cd/summary/code/ocaml/00_basics.ml b/core/cd/summary/code/ocaml/00_basics.ml index 9e1aea2..ff5aaf1 100644 --- a/core/cd/summary/code/ocaml/00_basics.ml +++ b/core/cd/summary/code/ocaml/00_basics.ml @@ -34,3 +34,7 @@ let double_all_t (arg : int list) : int list = List.rev (aux arg []) let print_list (list : 'a list) = List.iter (Printf.printf "%d") list + +(* We can also use pattern matching for the tuple contents *) +let tup = 100, "String", true +let second (_, x, _) = x