Scientific Calculator

(public) silentmatt/strings

By silentmatt Matthew Crumley

String functions: join and explode

Tagged: list string

var join = function(list, sep) {
    // foldl(function(partial, item) { concat(partial, sep, item) }, map(string, list)) or ""
    string:join(list, sep);
};

var explode = (s) -> map(:(), s);

spam? | offensive?

2 Comments

Sign in to leave a comment