! I needed to know what trim removed on each side on the sequence; can this be better written? : find-idx ( seq quot -- idx ) find drop ; inline : find-last-idx ( seq quot -- idx ) find-last drop ; inline : trim-idx ( seq quot -- idx-head idx-last ) [ not ] compose ! Negate quot [ find-idx ] [ find-last-idx ] 2bi ; inline :: (trim-keep) ( seq a b -- middle before after ) a b 1 + seq subseq seq a head seq b 1 + tail ; : trim-keep ( seq quot -- middle before after ) dupd trim-idx (trim-keep) ; inline