summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
eb8ac48)
Signed-off-by: Jim Pryor <profjim@jimpryor.net>
records let you attach descriptive labels to the components of the tuple:
# type blah_record = { height : int; weight : int; char_tester : char -> bool };;
records let you attach descriptive labels to the components of the tuple:
# type blah_record = { height : int; weight : int; char_tester : char -> bool };;
- # let b2 = { height = 1; weight = 2; char_tester = fun c -> c = 'M' };;
+ # let b2 = { height = 1; weight = 2; char_tester = (fun c -> c = 'M') };;
val b2 : blah_record = {height = 1; weight = 2; char_tester = <fun>}
# let b3 = { height = 1; char_tester = (fun c -> c = 'K'); weight = 3 };; (* also works *)
val b3 : blah_record = {height = 1; weight = 3; char_tester = <fun>}
val b2 : blah_record = {height = 1; weight = 2; char_tester = <fun>}
# let b3 = { height = 1; char_tester = (fun c -> c = 'K'); weight = 3 };; (* also works *)
val b3 : blah_record = {height = 1; weight = 3; char_tester = <fun>}