When one would like to serialize a ClosedIntervals to the disk and/or via JSON, it's problematic to have the functions order and eq as part of the data structure. Maybe it's better to define a protocol and dispatch it on the data contained in the tree?