a.cd 483 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
let f (g : Byte -> Byte)(s : Latin1) : Latin1 = map s with x -> g x

let x = ref Byte 'a'

let g (r : ref Byte) : [] = r := 'a'

let re (c : { x = Float }) : Float = c . x

let diag (x : Float) : {| x = Float; y = Float |} = { x = x; y = x }

let map_complex (f : (Float,Float)->Float)(c : { x = Float; y = Float }) 
: Float = 
  f (c . x, c . y)


let pp (x : Any) : Latin1 = string_of x
17
18
19
20
21
22
23


let exists = external "Sys.file_exists"

let i = 1

let home = external "Sys.getenv" "HOME"