flatten package:dual-tree

A specialized fold provided for convenience: flatten a tree into a list of leaves along with their d annotations, ignoring internal data values.