Skip to content

Instantly share code, notes, and snippets.

@dom96
Created July 13, 2010 15:28
Show Gist options
  • Save dom96/474029 to your computer and use it in GitHub Desktop.
Save dom96/474029 to your computer and use it in GitHub Desktop.
intersperse' :: Char -> [String] -> String
intersperse' _ [] = ""
intersperse' sep (x:xs) = if not (null rest)
then x ++ ([sep] ++ rest)
else x
where rest = intersperse' sep xs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment