Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type OtherType = { x :: Int, y :: Int, z :: String } deriving (Show)
- data SelectionType = A | B
- myMapper = map foo someMyTypes
- foo :: SelectionType -> MyType -> OtherType
- foo sel t = [ x t, y t, z t <> something ]
- where
- case SelectionType of
- A -> something = "a selected"
- B -> something = "b selected"
- foo sel t = [ x t, y t, z t <> something ]
- where
- something = case sel of
- A -> "a selected"
- B -> "b selected"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement