Open DaQuirm opened 4 years ago
Given the following encoding for tuples:
tuple a b f = f a b
write accessor functions for the first and the second components of the tuple:
fst t should equal a snd t should equal b
fst t
a
snd t
b
where
t = tuple a b
Given the following encoding for tuples:
tuple a b f = f a b
write accessor functions for the first and the second components of the tuple:
fst t
should equala
snd t
should equalb
where
t = tuple a b