Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- datatype 'a num_dict
- = NumD of {plus : 'a * 'a -> 'a, neg : 'a -> 'a}
- fun sub (NumD {plus, neg}) (m, n) = plus (m, neg n)
- val x = sub (NumD {plus=op+, neg=op ~}) (0, 1)
- val y = sub (NumD {plus=op+, neg=op ~}) (0.0, 1.0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement