IN: ... USING: kernel arrays math sequences ; : (match-min) ( seq item -- min ) [ > ] curry filter first ; : close-match ( seq1 seq2 -- seq3 ) swap [ swap [ (match-min) ] keep swap 2array ] curry map ; : complement ( seq -- seq' ) [ [ second ] map 0 prefix ] [ [ first ] map ] bi zip ; ! I plan to use this for seperating text from tags, ! manipulate the text, and rebuild the document.