replicate :: Int -> Char -> [Char] -- testing 360 combinations of argument values -- pruning with 0/0 rules -- looking through 1 candidates of size 1 -- looking through 0 candidates of size 2 -- looking through 1 candidates of size 3 -- looking through 2 candidates of size 4 -- looking through 2 candidates of size 5 -- looking through 3 candidates of size 6 -- looking through 4 candidates of size 7 replicate 0 c = "" replicate x c = c:replicate (dec x) c replicates :: [Char] -> Int -> [Char] -- testing 360 combinations of argument values -- pruning with 2/2 rules -- looking through 1 candidates of size 1 -- looking through 0 candidates of size 2 -- looking through 0 candidates of size 3 -- looking through 1 candidates of size 4 -- looking through 1 candidates of size 5 replicates cs x = concat (transpose (replicate x cs)) replicates :: [Char] -> Int -> [Char] -- testing 360 combinations of argument values -- pruning with 0/0 rules -- looking through 1 candidates of size 1 -- looking through 0 candidates of size 2 -- looking through 0 candidates of size 3 -- looking through 0 candidates of size 4 -- looking through 1 candidates of size 5 replicates cs x = concat (map (replicate x) cs) replicates :: [Char] -> Int -> [Char] -- testing 360 combinations of argument values -- pruning with 9/14 rules -- looking through 2 candidates of size 1 -- looking through 3 candidates of size 2 -- looking through 7 candidates of size 3 -- looking through 24 candidates of size 4 -- looking through 64 candidates of size 5 -- looking through 161 candidates of size 6 -- looking through 469 candidates of size 7 -- looking through 1303 candidates of size 8 replicates "" x = "" replicates (c:cs) x = replicate x c ++ replicates cs x