Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- two options
- -- #1 -- i could replace (,,) with a special ADT but the principle is the same
- f :: Input -> (A,B,C)
- g :: (A,B,C) -> Output
- program :: Input -> Output
- program = g . f
- --- #2, what i call "callback style" probably incorrectly
- type WithInput a = X -> Y -> Z -> a
- f :: WithInput Output -> Input -> Output
- g :: WithInput Output
- program :: Input -> Output
- program = f g
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement