Initial data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 72d218235f
commit f23f22d71c
199087 changed files with 3378941 additions and 0 deletions

View file

@ -0,0 +1,26 @@
defmodule Odd_word do
def handle(s, false, i, o) when ((s >= "a" and s <= "z") or (s >= "A" and s <= "Z")) do
o.(s)
handle(i.(), false, i, o)
end
def handle(s, t, i, o) when ((s >= "a" and s <= "z") or (s >= "A" and s <= "Z")) do
d = handle(i.(), :rec, i, o)
o.(s)
if t == true, do: handle(d, t, i, o), else: d
end
def handle(s, :rec, _, _), do: s
def handle(?., _, _, o), do: o.(?.); :done
def handle(:eof, _, _, _), do: :done
def handle(s, t, i, o) do
o.(s)
handle(i.(), not t, i, o)
end
def main do
i = fn() -> IO.getn("") end
o = fn(s) -> IO.write(s) end
handle(i.(), false, i, o)
end
end
Odd_word.main