Advertisement
Guest User

Untitled

a guest
May 20th, 2018
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. leg :: Int -> Int -> Int
  2. leg a b | a < b = 1
  3. | b < a = -1
  4. | a == b = 0
  5.  
  6. (*.) :: (Double,Double) -> (Double,Double) -> (Double,Double)
  7. (a1,b1) *. (a2,b2) = (a1*a2, b1*b2)
  8.  
  9. lista22 [] = []
  10. lista22 [_] = []
  11. lista22 (_:x:xs) = x : lista22 xs
  12.  
  13. suma1 = sum(map(\i -> 2/((i^2)+1))[1..2000])
  14. iloczyn1 = product(map(\i -> sin i * cos i)[20..45])
  15.  
  16. sumTree Null = 0
  17. sumTree (Leaf a) = a
  18. sumTree (Node a left right) = a + sumTree left + sumTree right
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement