Ideal Hash Array Mapped Tries: an Erlang functional datatype