Jump to content

99 Elm Problems/Problem 15/Solutions

From Wikibooks, open books for an open world

Solution 1: Using List.foldr

repeatElements n = List.foldr (\a b -> List.repeat n a ++ b) []