tags:

views:

50

answers:

1

I have given : spacegather : string list -> string

I have to make a function, so it turns the call:

spacegather ["I", "am", "nice"] to -> "I am nice"

thanx

A: 
intercalate xs xss = concat (intersperse xs xss)

Find the practical meaning of intercalate. Here is intersperse:

(*intersperse x [a,b,c..,z]=>[a,x,b,x,c,x..,x,z]*)

fun intersperse y  nil = nil
  | intersperse y [x] = [x]
  | intersperse y (x::xs)=x::y::(intersperse y xs)
Frayser