First stab at treap in Erlang