nl_tokens: Flatten a tree one level . ( Monadic join . ) RoseTree ( RoseTree a ) - > RoseTree a
pl_tokens: function flatten ( tree ) { if ( ! ( tree . root instanceof RoseTree ) ) { throw new TypeError ( "Can't call flatten when elements aren't trees" ) ; } return new RoseTree ( tree . root . root , function ( ) { var innerChildren = tree . root . children ( ) ; var outerChildren = tree . children ( ) . <mask> ( flatten ) ; return outerChildren . concat ( innerChildren ) ; } ) ; }