eval_concat.cd 315 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12
let fun f (x : Int) : Int = x + 1;;
f 2;;

let fun g (x : [Int*]) : [Int*] = (1,2,3,x);;
g [10 20 30];;
[1 2 3] [10 20 30];;

let fun h (x : [Int*] | ([Int*] -> [Int*])) : [Int*] = x [ 1 2 3 ];;

h [ 10 20 ];;
h (fun (x : [Int*]) : [Int*] = [ 100 200 ] x);;

13 14
(* 'explode' subsequences *)
[ 1 2 3 ![4 5 6] 7 8 9 ];;