chirp 1 = "chirp."
chirp n = "chirp-" ++ chirp (n-1)
Also, you never said anything about Haskell standard functions :)
import Data.List (intercalate)
chirp = (++".") . intercalate '-' . (flip replicate) "chirp"
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.