oonta 0.3.1

OCaml (subset) to LLVM IR compiler front-end
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
type 'a list = Empty | Cat of ('a * 'a list)

let rec map f lst =
  match lst with Empty -> Empty | Cat (x, xs) -> Cat (f x, map f xs)

let a = Cat (3, Empty)
let b = Empty
let c = map print_int a
let d = map print_int b
let print_bool b = if b then print_int 1 else print_int 0
let () = print_bool (c > d)
let () = print_bool (c >= d)
let () = print_bool (c < d)
let () = print_bool (c <= d)
let () = print_bool (c = d)