1 ! (c)2009 Slava Pestov & Joe Groff, see BSD license
2 USING: combinators.short-circuit fry make math kernel sequences ;
5 : (squish) ( seq quot: ( obj -- ? ) -- )
6 2dup call [ '[ _ (squish) ] each ] [ drop , ] if ; inline recursive
8 : squish ( seq quot exemplar -- seq' )
9 [ [ (squish) ] ] dip make ; inline
11 : squish-strings ( seq -- seq' )
12 [ { [ sequence? ] [ integer? not ] } 1&& ] "" squish ;