more efficient Array.of_seq (only allocates one intermediate list, then reverse the array);
test of Array.to_seq and Sequence.append
more functions on Hashtbl;
functor for conversion between Map and Sequence