|
if 0=1 then 0 else true;;
let t=0 in if t=1 then 0 else t;;
let a=1 in let b=2. in a+(if b>0. then a else -a);;
let sum (a,b) = a+b in sum (4.,3);;
let sum a b = a+b in sum 4 3;;
(+) 4 3;;
let add = function x -> (function y -> x+.y) in add 4.;;
function f -> (function x -> (f (x+1) - 1));;
let f x = function y -> 2*x+y;;
(function x -> not (not x)) false;;
int -> float -> int
(int -> int) -> int
(int -> int) -> int -> int
int * bool * int -> int * int
(int -> bool) * (bool -> int)
let f x = 1;;
let f x = x;;
let f x y = x = y;;
let f (x,y) = x;;
let f g x = g x;;
let f x = x x;;
This document was translated from LATEX by HEVEA.