!set match_random := 100 ;; s := (5, 4, 7, 2, 4, 8, 3) ;; s.(3) ;; trans T1 = { x => x + 1; } ;; T1(s) ;; trans T2 = { x / (x % 2 == 0) => x + 1; } ;; T2(s) ;; trans map[f] = { x => f(x); } ;; map[f=(\x.(if x % 2 == 0 then x+1 else x fi))](s) ;; trans T3 = { x / qleft(x) => x + left(x); } ;; T3(s) ;; trans bubble = { x, y / x < y => y, x; x, y / x == y => x } ;; s ;; bubble[fixpoint](s) ;; trans T4 = { x / x % 2 == 0 => ; } ;; a := [| 5, 4, 7, 2, 4, 8, 3 |] ;; s' := T4(s) ;; a' := T4(a) ;; arrayify(s') ;; !quit ;; 1+2 ;; 123 ;; 123.53452 ;; true ;; false ;; "kllmkjhlmkjlmkjnlmkn" ;; `red ;; `coeur ;; `carreau ;; `pique ;; `trefle ;; 1235 % 5 ;; 123 == 56345 ;; 123 < 56345 ;; 123 > 56345 ;; 123 >= 56345 ;; 123 <= 56345 ;; 123 <> 56345 ;; 123 != 56345 ;; false || true ;; false && true ;; not(false) ;; if 123 > 346 then `youpi elif 123 > 6 then `Reyoupi else `boff fi ;; true || (1 / 0 == 2) ;; let x = 3 + 2 in let y = 2 + 6 in y * x ;; x := (y := 123) ;; x ;; y := 4 ;; x ;; cos(0.) ;; add(2,3) ;; add ;; cos ;; add == cos ;; fun plus(x,y) = add(y,x) ;; plus == add ;; succ(3) ;; add(3) ;; add(3)(5) ;; plus3 := add(3) ;; plus3(5) ;; fun plus3(x) = add(3,x) ;; plus3(5) ;; let succ = (\x.(x+1)) // (fun x -> x + 1) in succ(3) ;; (\x.(x+1))(3) ;; add := (\x,y.(x+y)) ;; // \x.(\y.x+y) ;; fun fact(n) = if (n <= 0) then 1 else n * fact(n-1) fi ;; fact(5) ;;