September 26, 2016 - register now!
July 22, 2016
July 19, 2016
July 18, 2016
July 12, 2016
(* Binary tree with leaves carrying an integer. *) type tree = Leaf of int | Node of tree * tree let rec exists_leaf test tree = match tree with | Leaf v -> test v | Node (left, right) -> exists_leaf test left || exists_leaf test right let has_even_leaf tree = exists_leaf (fun n -> n mod 2 = 0) tree
OCaml is a lot more powerful than this simple example shows. See more examples!
|bos||0.1.2||18 Jun 2016|
|topkg-care||0.7.4||17 Jun 2016|
|topkg||0.7.4||17 Jun 2016|
|osx-attr||0.2.0||16 Jun 2016|
|osx-xattr||0.3.0||16 Jun 2016|
|unix-sys-stat||0.5.0||16 Jun 2016|