str-fry can take non-literals

db4
Sam Anklesaria 2009-05-02 08:22:14 -05:00
parent 50d0597580
commit 91e8e9522c
1 changed files with 5 additions and 2 deletions
extra/str-fry

View File

@ -1,4 +1,7 @@
USING: kernel sequences splitting strings.parser ;
USING: fry.private kernel macros math sequences splitting strings.parser ;
IN: str-fry
: str-fry ( str -- quot ) "_" split unclip [ [ rot glue ] reduce ] 2curry ;
: str-fry ( str -- quot ) "_" split
[ length 1 - [ncurry] [ call ] append ]
[ unclip [ [ rot glue ] reduce ] 2curry ] bi
prefix ;
SYNTAX: I" parse-string rest str-fry over push-all ;