     ] map sum ;
 
 <PRIVATE
-
 : 2roman> ( str1 str2 -- m n )
     [ roman> ] bi@ ;
 
 : binary-roman-op ( str1 str2 quot -- str3 )
     >r 2roman> r> call >roman ; inline
-
 PRIVATE>
 
 : roman+ ( str1 str2 -- str3 )

! Copyright (C) 2007 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.

USING: arrays assocs kernel math math.order math.vectors namespaces
quotations sequences sequences.lib sequences.private strings unicode.case ;
IN: roman

<PRIVATE

: roman-digits ( -- seq )
    { "m" "cm" "d" "cd" "c" "xc" "l" "xl" "x" "ix" "v" "iv" "i" } ;

: roman-values ( -- seq )
    { 1000 900 500 400 100 90 50 40 10 9 5 4 1 } ;

TUPLE: roman-range-error n ;

: roman-range-check ( n -- )
    dup 1 3999 between? [
        drop
    ] [
        roman-range-error boa throw
    ] if ;

: roman<= ( ch1 ch2 -- ? )
    [ 1string roman-digits index ] bi@ >= ;

    ] [
        first2 swap -
    ] if ;
PRIVATE>

: >roman ( n -- str )
