Erlang NIF implementation of N-ary tree
