diff --git a/src/hackerRank/functional1.hs b/src/hackerRank/functional1.hs new file mode 100644 index 0000000..4d8542d --- /dev/null +++ b/src/hackerRank/functional1.hs @@ -0,0 +1,4 @@ +-- https://www.hackerrank.com/challenges/fp-list-replication/ + +f :: Int -> [Int] -> [Int] +f s = concatMap (replicate s)