mirror of
https://github.com/janishutz/eth-summaries.git
synced 2026-10-09 05:46:20 +02:00
[CD] Add tuples to OCAML notes
This commit is contained in:
1 parent
c202fa74f5
commit
9cdf8ca4bf
1 file changed
+4
@@ -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
|
||||
Reference in new issue
Block a user