June 2018 Update

This commit is contained in:
Ingy döt Net 2018-06-22 20:57:24 +00:00
parent ba8067c3b7
commit 22f33d4004
5278 changed files with 84726 additions and 14379 deletions

View file

@ -0,0 +1,24 @@
function longer(a, b)
try
b[endof(a)]
catch
return true
end
return false
end
function printlongest(io::IO)
lines = longest = ""
while !eof(io)
line = readline(io)
if longer(line, longest)
longest = lines = line
elseif !longer(longest, line)
lines *= "\n" * line
end
end
println(lines)
end
printlongest(str::String) = printlongest(IOBuffer(str))
printlongest("a\nbb\nccc\nddd\nee\nf\nggg")