example.com/path/to/article
000 points · username · 0 hours ago
example.com0 points · 0 comments · 9 years ago · fusiongyro
Erlang's great though. Glad to see some irrational exuberance for it.
erez
nayuki
f [n] = [n]
f [m, n] = [m, n, 0, 1]
f [m, n, r, 1] = [m, n, mod m n, 2]
f [m, n, r, 2] = if r == 0 then [n] else [m, n, r, 3]
f [m, n, p, 3] = [n, p, p, 1]
It needs to be implemented with variable-length lists instead of fixed-length tuples, in order to satisfy the type system.
old_sound
I've mostly wrote this joke since many Erlang beginners find the semi-colon/period syntax confusing, but then there you have it on an essential book about programming
krmboya