Implements immutable-hash API.

except it still lacks filter/diff.