[ create a new paste ] login | about

Link: http://codepad.org/AJ4KfSgc    [ raw code | fork ]

OCaml, pasted on May 26:
1
2
3
4
5
6
7
8
9
10
11
12
[<Struct>]
type x = 
    val mutable abc :  Nullable<int>

[<Struct>]
type p = 
    val mutable a : Nullable<x>

let t = x(abc=Nullable 1)

let m = t.abc.Value // this value gets copied by F# compiler to avoid mutation
let n = t.abc |> fun e -> e.Value // does this also get copied?


Create a new paste based on this one


Comments: