99 Elm Problems/Problem 15/Solutions
(Redirected from 99 Elm Problems/More Lists/Problem 15: Repeat each element/Solutions)
Solution 1: Using List.foldr
repeatElements n = List.foldr (\a b -> List.repeat n a ++ b) []
Solution 1: Using List.foldr
repeatElements n = List.foldr (\a b -> List.repeat n a ++ b) []