]> gitweb.factorcode.org Git - factor.git/commitdiff
Remove sequences.lib dependencies from project-euler.common and roman
authorSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Thu, 18 Dec 2008 02:04:24 +0000 (20:04 -0600)
committerSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Thu, 18 Dec 2008 02:04:24 +0000 (20:04 -0600)
extra/project-euler/common/common.factor
extra/roman/roman.factor

index 35d9c65b538c1cc65de645555fbce855630f95e7..1a57a91e5eca093e617558b16ede89e1e6b2a95d 100644 (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 / ;
index 978587c685d8aa8beb208014daa478aa64fa1764..866ac928720f8d6ccef8e612a9f2347531f96a4d 100644 (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