Advertisement
VladNitu

LemonCurry_W2L2_Batch3_Q4_Vlad

Feb 21st, 2024
1,563
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import Prelude hiding (curry, uncurry)
  2.  
  3. -- f :: ((a, b) -> c)
  4. -- x :: a
  5. -- y :: b
  6. curry :: ((a, b) -> c) -> (a -> b -> c)
  7. curry f x y = f (x, y)  
  8.  
  9. -- f :: a -> b -> c
  10. -- (x, y) :: (a, b)
  11. uncurry :: (a -> b -> c) -> ((a, b) -> c)
  12. uncurry f (x, y) = f x y
  13.  
  14.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement