(fn split [string] (accumulate [res [] v _ (string:gmatch "%S+")] (do (table.insert res v) res))) (fn ends-with [string end] (= (string.sub string (- (# end))) end)) {: split : ends-with}