oddSquareSum :: Integer oddSquareSum = let oddSquares = filter odd $ map (^2) [1..] belowLimit = takeWhile (<10000) oddSquares in sum belowLimit --extra code to print the list of integers show belowLimit
This is the code to print the sum of squares of odd numbers. The list of squared odd numbers is in the list,
belowLimit and how can i print it?
Adding it as an extra line at the end, gives compilation errors as the
show function call is treated as
sum function's argument.