Type inference (example) wrap(str, width) = all = [] ; line = "" str.words.each.(l -> if size(line+l) >= width then all += [line] line = "" line += (line &&& " ") + l ) join(all + [line], "\n") str.words implies str !< String since words !! String -> [String] size(...) >= width implies width !< Uint since size !! Enumerable(a) -> Uint the return value join(...) !! String since join !! o(a), a -> o !< Vector ; a !< Addable ; a The result is: wrap !! String, Uint -> String ⇒ each call to wrap will be type-checked wrap("foo", "bar") is ill-typed and is rejected