Advertisement
Guest User

Untitled

a guest
Dec 18th, 2017
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.09 KB | None | 0 0
  1. sum_sq_to :: (Num a, Ord a, Enum a) => a->[a]
  2. sum_sq_to x = sum takeWhile (<x) [x^2 | x<-[1..]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement