aydarbiktimirov

Untitled

Jun 6th, 2014
294
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. let values operations numbers = case numbers of x:[] -> [x]
  2.                                                 l -> [1..(length numbers - 1)] >>= (\ i -> [op k m | op <- operations, k <- values operations $ take i l, m <- values operations $ drop i l])
  3.  
  4.  
  5. let check operations numbers = 0 `elem` (values operations numbers)
  6.  
  7. check [(+), (-), (*)] [1,2,2]
Advertisement
Add Comment
Please, Sign In to add comment