diff --git a/extra/str-fry/str-fry.factor b/extra/str-fry/str-fry.factor index aafdaa95d9..65e25e2580 100644 --- a/extra/str-fry/str-fry.factor +++ b/extra/str-fry/str-fry.factor @@ -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 ; \ No newline at end of file