Collect and sort square numbers in ascending order from three lists: Difference between revisions
Content added Content deleted
(J) |
|||
Line 273: | Line 273: | ||
squaresSorted :: Integral a => [[a]] -> [a] |
squaresSorted :: Integral a => [[a]] -> [a] |
||
squaresSorted = sort . (filter isPerfectSquare |
squaresSorted = sort . concatMap (filter isPerfectSquare) |
||
isPerfectSquare :: Integral a => a -> Bool |
isPerfectSquare :: Integral a => a -> Bool |