The smalltalk solution makes a lot more sense now, thinking about trying my hand at Erlang
JavaScript was broken, of course..