A compact functional set data structure