Hi guys,

I think we need to stop using roll, -roll, and swapd.

I've removed three usages of -roll just now. Here are the before and after:

: >c-array ( seq type word -- )
    >r >r dup length dup r> <c-array> dup -roll r>
    [ execute ] 2curry 2each ; inline

: >c-array ( seq type word -- )
    [ [ dup length ] dip <c-array> ] dip
    [ [ execute ] 2curry each-index ] 2keep drop ; inline

------

: with-fork ( child parent -- )
    >r >r fork-process dup zero? r> r> -roll swap curry if ; inline

: with-fork ( child parent -- )
    [ [ fork-process dup zero? ] dip [ drop ] prepose ] dip
    if ; inline

------

M: array day-of-year
    first3 3dup day-counts rot head-slice sum + swap leap-year?
    [ -roll pick 3 1 <date> >r <date> r> after=? [ 1+ ] when ]
    [ >r 3drop r> ] if ;

:: (day-of-year) ( year month day -- n )
    day-counts month head-slice sum day +
    year leap-year? [
        year month day <date>
        year 3 1 <date>
        after=? [ 1+ ] when
    ] when ;

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to