         and-needed? off
     ] if ;
 
-: (recombine) ( str index seq -- newstr seq )
+: (recombine) ( str index seq -- newstr )
     2dup nth zero? [
-        nip
+        2drop
     ] [
-        [ text-with-scale ] keep
-        -rot append-with-conjunction swap
+        text-with-scale append-with-conjunction
     ] if ;
 
 : recombine ( seq -- str )
     dup length 1 = [
         first 3digits>text
     ] [
-        dup set-conjunction "" swap
-        dup length [ swap (recombine) ] each drop
+        [ set-conjunction "" ] [ length ] [ ] tri
+        [ (recombine) ] curry each
     ] if ;
 
 : (number>text) ( n -- str )

! Copyright (c) 2007 Aaron Schaefer.
! See http://factorcode.org/license.txt for BSD license.
USING: combinators.lib kernel math math.functions math.parser namespaces
sequences splitting grouping combinators.short-circuit ;
IN: math.text.english

<PRIVATE

    ] if ;

: 3digits>text ( n -- str )
    [ hundreds-place ] [ tens-place ] bi append ;

: text-with-scale ( index seq -- str )
    [ nth 3digits>text ] [ drop scale-numbers ] 2bi
    [ " " swap 3append ] unless-empty ;

: append-with-conjunction ( str1 str2 -- newstr )
    over length zero? [
