Current section

Files

Jump to
apollo18 lib k y.ex
Raw

lib/k/y.ex

defmodule Hexzip.Z do
@moduledoc false
alias Krug.StringUtil
@one 1
@zero 0
def x(z,y,w) do
z(z,y,w,[])
end
defp d(x,y) do
x * y
end
defp z(w,x,y,z) do
cond do
(w > x)
-> z |> x()
true
-> w |> d() |> z(x,y,x(z,w(w,y)))
end
end
defp w(y,w) do
z = y |> w() |> y(w) |> y()
[d() |> z(z),c() |> z(z),d() |> d() |> d() |> z(z),d() |> d() |> z(z)] |> z()
end
defp y(y) do
y |> String.graphemes()
end
defp y(u,y) do
u |> StringUtil.left_zeros(y,true)
end
defp w(w) do
d = d() |> d() |> d()
w |> Integer.to_string(d |> d(d |> d() |> d()) |> d())
end
defp x(z,x) do
[x | z]
end
defp d() do
@one + c()
end
defp z(a,z) do
z |> Enum.at(a)
end
defp z(z) do
z |> IO.iodata_to_binary()
end
defp x(x) do
x |> Enum.reverse()
end
defp c() do
@zero
end
defp d(r) do
@one + r
end
end