add list\intercalate

This commit is contained in:
darkf 2014-06-19 01:03:47 -07:00
parent 209c815f80
commit aab89f838b
1 changed files with 4 additions and 0 deletions

View File

@ -67,3 +67,7 @@ drop(n, _::xs) -> drop(n-1, xs).
take(0, _) -> [].
take(n, []) -> [].
take(n, x::xs) -> x :: take(n-1, xs).
intercalate(s, []) -> "".
intercalate(s, x::[]) -> x.
intercalate(s, x::xs) -> x + s + intercalate(s, xs).