Closed robrix closed 8 years ago
Equivalent to ignore(opening) ++ body ++ ignore(closing)
I suppose.
I didn't realize this equivalence and wrote a custom bookend
operator. Although it was slightly different since it assumed body*
which it then flattened the elements for.
bookend
is a nice name for this!
I probably spent far too much time thinking about it after iterating through wrap, quote, etc.
Is this still necessary given #91? (namely opening *> body <* closing
being now possible)
Probably not; closing.
For example parenthesized expressions. The parens are syntactically important but don’t contribute to the tree; the wrapped combinator’s result should therefore be passed through, and the wrapping terms should be dropped.