PageRenderTime 3ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/froc-sanity2/f.ml

http://github.com/hhughes/ocaml-frui
OCaml | 13 lines | 9 code | 4 blank | 0 comment | 0 complexity | 157df25196a8214128eab05980c5b0dd MD5 | raw file
 1open Froc
 2open Printf
 3
 4let (>>=) = Froc.(>>=)
 5
 6let x = return 1
 7let y = return 2
 8let z = return 3
 9
10let i0 = x >>= fun x -> y >>= fun y -> return (x+y)
11let ans = i0 >>= fun i0 -> z >>= fun z -> return (i0 + z);;
12
13printf "ans = %d\n" (sample ans);;