Write a procedure (intercalate sep lst) where sep is a string and lst is a list of strings that returns a returns a string consisting of the concatenation of the elements of lst separated by the string sep. For example (intercalate ” ” ‘(“I” “love” “functional” “programming”)) returns “I love functional programming” and (intercalate “–” ‘(“A” “B” “C” “D”)) returns “A–B–C–D”.
0 comments