DDC/PolymorphicUpdate
Jump to navigation
Jump to search
Get/Set
Consider the following function:
makeGetSet :: a -> (() -> a, a -> ())
makeGetSet x
= do box = Just x
get () = case box of { Just z -> z; }
set z = box#x #= z
(get, set)