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,33 @@
# io = readstring(STDIN)
io = "what,is,the;meaning,of:life."
i = 0
readbyte!() = io[global i += 1]
writebyte(c) = print(Char(c))
function odd(prev::Function = () -> false)
a = readbyte!()
if !isalpha(a)
prev()
writebyte(a)
return a != '.'
end
# delay action until later, in the shape of a closure
clos() = (writebyte(a); prev())
return odd(clos)
end
function even()
while true
c = readbyte!()
writebyte(c)
if !isalpha(c) return c != '.' end
end
end
evn = false
while evn ? odd() : even()
evn = !evn
end