Remove sequences.lib dependencies from project-euler.common and roman

db4
Slava Pestov 2008-12-17 20:04:24 -06:00
parent a86171481e
commit cd5ae48670
2 changed files with 4 additions and 4 deletions

View File

@ -2,7 +2,7 @@
! See http://factorcode.org/license.txt for BSD license.
USING: arrays kernel make math math.functions math.matrices math.miller-rabin
math.order math.parser math.primes.factors math.ranges math.ratios
sequences sequences.lib sorting strings unicode.case ;
sequences sorting strings unicode.case ;
IN: project-euler.common
! A collection of words used by more than one Project Euler solution
@ -42,7 +42,7 @@ IN: project-euler.common
[ over rest rot first2 max rot + ] map nip ;
: (sum-divisors) ( n -- sum )
dup sqrt >fixnum [1,b] [
dup sqrt >integer [1,b] [
[ 2dup mod 0 = [ 2dup / + , ] [ drop ] if ] each
dup perfect-square? [ sqrt >fixnum neg , ] [ drop ] if
] { } make sum ;
@ -56,7 +56,7 @@ PRIVATE>
>lower [ CHAR: a - 1+ ] sigma ;
: cartesian-product ( seq1 seq2 -- seq1xseq2 )
swap [ swap [ 2array ] map-with ] map-with concat ;
swap [ swap [ 2array ] with map ] with map concat ;
: log10 ( m -- n )
log 10 log / ;

View File

@ -1,7 +1,7 @@
! Copyright (C) 2007 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: arrays assocs kernel math math.order math.vectors
namespaces make quotations sequences sequences.lib
namespaces make quotations sequences splitting.monotonic
sequences.private strings unicode.case lexer parser ;
IN: roman