factor/extra/str-fry/str-fry.factor

7 lines
280 B
Factor
Raw Normal View History

USING: combinators effects kernel math sequences splitting
strings.parser ;
2009-04-29 22:51:19 -04:00
IN: str-fry
: str-fry ( str -- quot ) "_" split
[ unclip [ [ rot glue ] reduce ] 2curry ]
[ length 1 - 1 <effect> [ call-effect ] 2curry ] bi ;
2009-04-29 22:51:19 -04:00
SYNTAX: I" parse-string rest str-fry over push-all ;