2016 Update

This commit is contained in:
Tina Müller 2016-12-05 22:15:40 +01:00
parent 948b86eafa
commit dcf5d15da3
7965 changed files with 139854 additions and 31002 deletions

View file

@ -0,0 +1,3 @@
fun dosomething (a, b, c) = print ("a = " ^ a ^ "\nb = " ^ Real.toString b ^ "\nc = " ^ Int.toString c ^ "\n")
fun example {a, b, c} = dosomething (a, b, c)

View file

@ -0,0 +1 @@
example {a="Hello World!", b=3.14, c=42}

View file

@ -0,0 +1,12 @@
datatype param = A of string | B of real | C of int
fun args xs =
let
(* Default values *)
val a = ref "hello world"
val b = ref 3.14
val c = ref 42
in
map (fn (A x) => a := x | (B x) => b := x | (C x) => c := x) xs;
(!a, !b, !c)
end

View file

@ -0,0 +1 @@
dosomething (args [A "tam", B 42.0]);