%% $Id: SeparatedBy.oz,v 1.2 2009/01/10 18:37:08 leavens Exp $ %% AUTHOR: Gary T. Leavens \insert 'AppendMap.oz' declare fun {SeparatedBy Sep} fun {$ L} %% ENSURES: Result is the concatenation of the elements of list L %% separated by Sep case L of nil then "" [] E|Es then {Append E {AppendMap Es fun {$ S} {Append Sep S} end}} end end end