Flattens a list.
[lf,ind] = aplat(l,r)
a list
an optional flat list
a flat list (a single hierachical level)
a list, each entry give the path of the corresponding lf entry in the original list
Creates a flat list, built with the initial l list leaves and if given prepended by the r list entries