more peg
factoring out proper enclosed captures