Fixups will help people migrate their code.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors arrays bit-arrays fry kernel kernel.private
layouts locals math math.functions math.order math.private
-math.ranges multiline sequences sequences.private typed ;
+ranges multiline sequences sequences.private typed ;
IN: bloom-filters
! Copyright (C) 2011 Erik Charlebois.
! See http://factorcode.org/license.txt for BSD license.
-USING: parser system kernel sequences math math.ranges
+USING: parser system kernel sequences math ranges
cpu.ppc.assembler combinators compiler.constants
bootstrap.image.private layouts namespaces ;
IN: bootstrap.ppc
! Copyright (C) 2011 Erik Charlebois.
! See http://factorcode.org/license.txt for BSD license.
-USING: parser system kernel sequences math math.ranges
+USING: parser system kernel sequences math ranges
cpu.ppc.assembler combinators compiler.constants
bootstrap.image.private layouts namespaces ;
IN: bootstrap.ppc
! See http://factorcode.org/license.txt for BSD license.
USING: bootstrap.image.private kernel kernel.private namespaces
system cpu.ppc.assembler compiler.units compiler.constants math
-math.private math.ranges layouts words vocabs slots.private
+math.private ranges layouts words vocabs slots.private
locals locals.backend generic.single.private fry sequences
threads.private strings.private ;
FROM: cpu.ppc.assembler => B ;
-USING: accessors grouping kernel math math.order math.ranges
+USING: accessors grouping kernel math math.order ranges
math.vectors random sequences threads tools.test ;
IN: calendar
combinators.short-circuit kernel literals math math.functions
math.intervals math.order math.statistics sequences slots.syntax
system vocabs vocabs.loader ;
-FROM: math.ranges => [a..b) ;
+FROM: ranges => [a..b) ;
IN: calendar
ERROR: not-in-interval value interval ;
! See http://factorcode.org/license.txt for BSD license.
USING: accessors arrays calendar calendar.english combinators
formatting grouping io io.streams.string kernel make math
-math.order math.parser math.parser.private math.ranges present
+math.order math.parser math.parser.private ranges present
quotations sequences splitting strings words ;
IN: calendar.format
USING: arrays assocs calendar cbor kernel literals locals math
-math.parser math.ranges tools.test urls ;
+math.parser ranges tools.test urls ;
{
{ 0 "00" }
! Copyright (C) 2008 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
-USING: checksums classes.singleton kernel math math.ranges
+USING: checksums classes.singleton kernel math ranges
math.vectors sequences ;
IN: checksums.adler-32
! Copyright (C) 2009 Alaric Snell-Pym
! See http://factorcode.org/license.txt for BSD license.
-USING: checksums classes.singleton kernel math math.ranges
+USING: checksums classes.singleton kernel math ranges
math.vectors sequences ;
IN: checksums.fnv1
USING: accessors alien alien.c-types alien.data byte-arrays
checksums endian fry grouping kernel math math.bitwise
-math.ranges sequences ;
+ranges sequences ;
IN: checksums.murmur
! See http://factorcode.org/license.txt for BSD license.
USING: accessors alien.c-types arrays checksums checksums.common
combinators combinators.smart endian fry grouping kernel
-kernel.private literals locals math math.bitwise math.ranges
+kernel.private literals locals math math.bitwise ranges
sequences sequences.generalizations sequences.private
specialized-arrays ;
SPECIALIZED-ARRAY: uint
USING: accessors alien alien.c-types alien.data byte-arrays
checksums combinators endian fry grouping kernel math
-math.bitwise math.ranges sequences sequences.private ;
+math.bitwise ranges sequences sequences.private ;
IN: checksums.superfast
USING: accessors alien alien.c-types alien.data byte-arrays
checksums combinators endian generalizations grouping kernel
-locals math math.bitwise math.ranges sequences
+locals math math.bitwise ranges sequences
specialized-arrays ;
SPECIALIZED-ARRAY: uint64_t
! See http://factorcode.org/license.txt for BSD license
USING: arrays colors colors.cmyk kernel locals math.functions
-math.ranges sequences tools.test ;
+ranges sequences tools.test ;
{ t } [
0.0 1.0 0.1 <range> [| r |
! See http://factorcode.org/license.txt for BSD license
USING: arrays colors colors.hsl kernel locals math.functions
-math.ranges sequences tools.test ;
+ranges sequences tools.test ;
{ t } [
0.0 1.0 0.1 <range> [| r |
! See http://factorcode.org/license.txt for BSD license
USING: arrays colors colors.lab kernel locals math.functions
-math.ranges sequences tools.test ;
+ranges sequences tools.test ;
{ t } [
0.0 1.0 0.1 <range> [| r |
! See http://factorcode.org/license.txt for BSD license
USING: arrays colors colors.lch kernel locals math.functions
-math.ranges sequences tools.test ;
+ranges sequences tools.test ;
{ t } [
0.0 1.0 0.1 <range> [| r |
! See http://factorcode.org/license.txt for BSD license
USING: arrays colors colors.luv kernel locals math.functions
-math.ranges sequences tools.test ;
+ranges sequences tools.test ;
{ t } [
0.0 1.0 0.1 <range> [| r |
! See http://factorcode.org/license.txt for BSD license
USING: arrays colors colors.ryb kernel locals math.functions
-math.ranges sequences tools.test ;
+ranges sequences tools.test ;
{ t } [
0.0 1.0 0.1 <range> [| r |
! See http://factorcode.org/license.txt for BSD license
USING: arrays colors colors.xyy kernel locals math.functions
-math.ranges sequences tools.test ;
+ranges sequences tools.test ;
{ t } [
0.0 1.0 0.1 <range> [| r |
! See http://factorcode.org/license.txt for BSD license
USING: arrays colors colors.xyz kernel locals math.functions
-math.ranges sequences tools.test ;
+ranges sequences tools.test ;
{ t } [
0.0 1.0 0.1 <range> [| r |
! See http://factorcode.org/license.txt for BSD license
USING: arrays colors colors.yiq kernel locals math.functions
-math.ranges sequences tools.test ;
+ranges sequences tools.test ;
{ t } [
0.0 1.0 0.1 <range> [| r |
! See http://factorcode.org/license.txt for BSD license
USING: arrays colors colors.yuv kernel locals math.functions
-math.ranges sequences tools.test ;
+ranges sequences tools.test ;
{ t } [
0.0 1.0 0.1 <range> [| r |
USING: accessors arrays assocs compiler.cfg.dominance
compiler.cfg.dominance.private compiler.cfg.utilities compiler.test
-grouping kernel math.ranges namespaces sequences sets tools.test ;
+grouping kernel ranges namespaces sequences sets tools.test ;
IN: compiler.cfg.dominance.tests
: test-dominance ( -- )
! See http://factorcode.org/license.txt for BSD license.
USING: accessors arrays assocs bit-arrays byte-arrays
combinators compression.huffman fry kernel literals locals make
-math math.bits math.order math.ranges namespaces sequences
+math math.bits math.order ranges namespaces sequences
sequences.deep splitting vectors ;
IN: compression.gzip
! See http://factorcode.org/license.txt for BSD license.
USING: accessors arrays assocs bit-arrays bitstreams combinators
fry hashtables heaps io kernel locals math math.bits math.order
-math.parser math.ranges multiline namespaces sequences sorting
+math.parser ranges multiline namespaces sequences sorting
vectors ;
QUALIFIED-WITH: bitstreams bs
IN: compression.huffman
! See http://factorcode.org/license.txt for BSD license.
USING: accessors arrays assocs byte-vectors combinators
combinators.smart compression.huffman endian fry hashtables
-kernel literals locals math math.bitwise math.order math.ranges
+kernel literals locals math math.bitwise math.order ranges
sequences sorting memoize combinators.short-circuit byte-arrays ;
QUALIFIED-WITH: bitstreams bs
IN: compression.inflate
USING: accessors alien alien.c-types alien.data alien.syntax
byte-arrays byte-vectors classes.struct combinators
compression.zlib.ffi continuations destructors fry kernel libc
-math math.functions math.ranges sequences system ;
+math math.functions ranges sequences system ;
IN: compression.zlib
ERROR: zlib-failed n string ;
compiler.cfg.instructions compiler.cfg.intrinsics compiler.cfg.registers
compiler.cfg.stack-frame compiler.codegen compiler.codegen.fixup
compiler.constants compiler.units cpu.architecture cpu.ppc.assembler fry io
-kernel layouts literals locals make math math.order math.ranges memory
+kernel layouts literals locals make math math.order ranges memory
namespaces prettyprint sequences system vm words ;
QUALIFIED-WITH: alien.c-types c
FROM: cpu.ppc.assembler => B ;
! Copyright (C) 2018 Alexander Ilin.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors calendar calendar.parser classes continuations
-db.tester db.tuples db.types kernel math math.intervals math.ranges
+db.tester db.tuples db.types kernel math math.intervals ranges
namespaces random sequences sorting strings tools.test urls ;
IN: db.tuples.tests
! Copyright (C) 2006, 2009 Slava Pestov
! See http://factorcode.org/license.txt for BSD license.
-USING: accessors arrays kernel math math.order math.ranges
+USING: accessors arrays kernel math math.order ranges
models sequences splitting ;
IN: documents
! See http://factorcode.org/license.txt for BSD license.
USING: alien.c-types alien.data byte-arrays combinators
combinators.smart grouping hints kernel math math.bitwise
-math.ranges namespaces sequences sequences.generalizations ;
+ranges namespaces sequences sequences.generalizations ;
IN: endian
SINGLETONS: big-endian little-endian ;
! Copyright (C) 2017 John Benediktsson, Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: ascii assocs checksums checksums.sha combinators fry
-kernel math math.functions math.parser math.ranges
+kernel math math.functions math.parser ranges
math.statistics sequences sets sorting splitting strings uuid ;
IN: escape-strings
{ "string-lines" { "splitting:split-lines" "0.99" } }
{ "[-inf,a)" { "math.intervals:[-inf,b)" "0.99" } }
{ "[-inf,a]" { "math.intervals:[-inf,b]" "0.99" } }
- { "(a,b)" { "math.ranges:(a..b)" "0.99" } }
- { "(a,b]" { "math.ranges:(a..b]" "0.99" } }
- { "[a,b)" { "math.ranges:[a..b)" "0.99" } }
- { "[a,b]" { "math.ranges:[a..b]" "0.99" } }
- { "[0,b)" { "math.ranges:[0..b)" "0.99" } }
- { "[0,b]" { "math.ranges:[0..b]" "0.99" } }
- { "[1,b)" { "math.ranges:[1..b)" "0.99" } }
- { "[1,b]" { "math.ranges:[1..b]" "0.99" } }
+ { "(a,b)" { "ranges:(a..b)" "0.99" } }
+ { "(a,b]" { "ranges:(a..b]" "0.99" } }
+ { "[a,b)" { "ranges:[a..b)" "0.99" } }
+ { "[a,b]" { "ranges:[a..b]" "0.99" } }
+ { "[0,b)" { "ranges:[0..b)" "0.99" } }
+ { "[0,b]" { "ranges:[0..b]" "0.99" } }
+ { "[1,b)" { "ranges:[1..b)" "0.99" } }
+ { "[1,b]" { "ranges:[1..b]" "0.99" } }
{ "assoc-merge" { "assocs.extras:assoc-collect" "0.99" } }
{ "assoc-merge!" { "assocs.extras:assoc-collect!" "0.99" } }
{ "peek-from" { "modern.html:peek1-from" "0.99" } }
$nl
"Here is the " { $link POSTPONE: USING: } " form that we need for the below code to work:"
{ $code
- "USING: combinators kernel math.parser math.ranges random"
+ "USING: combinators kernel math.parser ranges random"
"html.templates.chloe.compiler html.templates.chloe.syntax ;"
}
"We write a word which extracts the relevant attributes from an XML tag:"
! See http://factorcode.org/license.txt for BSD license.
USING: accessors arrays byte-arrays combinators grouping images
kernel locals math math.order
-math.ranges math.vectors sequences sequences.deep fry ;
+ranges math.vectors sequences sequences.deep fry ;
IN: images.processing
: coord-matrix ( dim -- m )
-USING: images accessors kernel tools.test literals math.ranges
+USING: images accessors kernel tools.test literals ranges
byte-arrays ;
IN: images.tessellation
USING: assocs calendar calendar.format combinators
concurrency.messaging continuations debugger destructors init io
io.directories io.encodings.utf8 io.files io.pathnames kernel
-locals math math.parser math.ranges namespaces sequences
+locals math math.parser ranges namespaces sequences
strings threads ;
IN: logging.server
USING: accessors arrays assocs classes.tuple combinators hints
kernel kernel.private make math math.functions math.order
-math.ranges sequences sequences.private sorting strings vectors ;
+ranges sequences sequences.private sorting strings vectors ;
IN: math.combinatorics
<PRIVATE
USING: kernel literals math math.constants math.functions math.libm
-math.order math.ranges math.private sequences tools.test math.floats.env ;
+math.order ranges math.private sequences tools.test math.floats.env ;
IN: math.functions.tests
USING: accessors arrays classes.singleton columns combinators
combinators.short-circuit combinators.smart formatting fry
grouping kernel locals math math.bits math.functions math.order
-math.private math.ranges math.statistics math.vectors
+math.private ranges math.statistics math.vectors
math.vectors.private sequences sequences.deep sequences.private
slots.private summary ;
IN: math.matrices
USING: fry kernel math math.bitwise math.primes.erato
-math.ranges sequences tools.test ;
+ranges sequences tools.test ;
{ B{ 255 251 247 126 } } [ 100 sieve ] unit-test
[ 1 100 sieve marked-prime? ] [ bounds-error? ] must-fail-with
! Copyright (C) 2009 Samuel Tardieu.
! See http://factorcode.org/license.txt for BSD license.
USING: kernel kernel.private locals math math.bitwise
-math.functions math.order math.private math.ranges sequences
+math.functions math.order math.private ranges sequences
sequences.private ;
IN: math.primes.erato
! See http://factorcode.org/license.txt for BSD license
USING: bit-arrays fry kernel kernel.private literals locals math
-math.functions math.private math.ranges math.statistics
+math.functions math.private ranges math.statistics
sequences sequences.private ;
IN: math.primes.erato.fast
! See http://factorcode.org/license.txt for BSD license.
USING: arrays combinators command-line io kernel math
math.functions math.parser math.primes.pollard-rho-brent
-math.ranges math.statistics namespaces sequences
+ranges math.statistics namespaces sequences
sequences.product sets sorting splitting ;
IN: math.primes.factors
! Copyright (c) 2008-2009 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
-USING: combinators kernel locals math math.functions math.ranges
+USING: combinators kernel locals math math.functions ranges
random sequences ;
IN: math.primes.miller-rabin
! Copyright (C) 2021 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: arrays kernel make math math.order math.primes
-math.ranges random sorting ;
+ranges random sorting ;
IN: math.primes.pollard-rho-brent
! https://comeoncodeon.wordpress.com/2010/09/18/pollard-rho-brent-integer-factorization/
! See http://factorcode.org/license.txt for BSD license.
USING: combinators combinators.short-circuit fry kernel locals
math math.bitwise math.functions math.order math.primes.erato
-math.primes.erato.private math.primes.miller-rabin math.ranges
+math.primes.erato.private math.primes.miller-rabin ranges
literals random sequences sets vectors ;
IN: math.primes
-USING: arrays kernel math math.functions math.order math.ranges
+USING: arrays kernel math math.functions math.order ranges
math.vectors sequences tools.test ;
IN: math.statistics
! See http://factorcode.org/license.txt for BSD license.
USING: accessors arrays assocs combinators
combinators.short-circuit fry generalizations grouping kernel
-locals math math.functions math.order math.ranges math.vectors
+locals math math.functions math.order ranges math.vectors
sequences sequences.private sorting ;
IN: math.statistics
M: object sum-of-squares [ sq ] map-sum ;
M: iota sum-of-squares
n>> 1 - [ ] [ 1 + ] [ 1/2 + ] tri * * 3 / ;
-M: math.ranges:range sum-of-squares
+M: ranges:range sum-of-squares
dup { [ step>> 1 = ] [ from>> integer? ] } 1&& [
[ from>> ] [ length>> ] bi dupd +
[ <iota> sum-of-squares ] bi@ swap -
GENERIC: sum-of-cubes ( seq -- x )
M: object sum-of-cubes [ 3 ^ ] map-sum ;
M: iota sum-of-cubes sum sq ;
-M: math.ranges:range sum-of-cubes
+M: ranges:range sum-of-cubes
dup { [ step>> 1 = ] [ from>> integer? ] } 1&& [
[ from>> ] [ length>> ] bi dupd +
[ <iota> sum-of-cubes ] bi@ swap -
* * * 30 /
] [ 0 ] if
] ;
-M: math.ranges:range sum-of-quads
+M: ranges:range sum-of-quads
dup { [ step>> 1 = ] [ from>> integer? ] } 1&& [
[ from>> ] [ length>> ] bi dupd +
[ <iota> sum-of-quads ] bi@ swap -
! Copyright (C) 2009 Slava Pestov, Joe Groff.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors alien alien.data combinators cpu.architecture fry
-grouping kernel libc locals math math.libm math.order math.ranges
+grouping kernel libc locals math math.libm math.order ranges
sequences sequences.cords sequences.generalizations sequences.private
sequences.unrolled sequences.unrolled.private specialized-arrays
vocabs ;
USING: accessors arrays classes compiler.test compiler.tree.debugger
effects fry io kernel kernel.private math math.functions
-math.private math.vectors math.vectors.simd math.ranges
+math.private math.vectors math.vectors.simd ranges
math.vectors.simd.private prettyprint random sequences system
tools.test vocabs assocs compiler.cfg.debugger words
locals combinators cpu.architecture namespaces byte-arrays alien
USING: accessors assocs continuations fry http.server io
io.encodings.ascii io.files io.files.temp io.files.unique
io.servers io.streams.duplex io.streams.string
-kernel math.ranges mime.multipart multiline namespaces random
+kernel ranges mime.multipart multiline namespaces random
sequences sorting strings threads tools.test ;
IN: mime.multipart.tests
! Copyright (C) 2007, 2008 Chris Double, Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors fry kernel literals make math math.parser
-math.ranges peg peg.private sequences splitting strings unicode
+ranges peg peg.private sequences splitting strings unicode
vectors ;
FROM: peg.search => replace ;
IN: peg.parsers
IN: persistent.hashtables.tests
USING: persistent.hashtables persistent.assocs hashtables assocs
-tools.test kernel locals namespaces random math.ranges sequences fry ;
+tools.test kernel locals namespaces random ranges sequences fry ;
{ t } [ PH{ } assoc-empty? ] unit-test
! Copyright (C) 2019 Alexander Ilin.
! See http://factorcode.org/license.txt for BSD license.
-USING: fry literals math.ranges random sequences ;
+USING: fry literals ranges random sequences ;
IN: random.passwords
<PRIVATE
byte-vectors combinators combinators.short-circuit endian fry
hashtables hashtables.private hash-sets hints io.backend kernel
locals math math.bitwise math.constants math.functions
-math.order math.ranges namespaces sequences sequences.private
+math.order ranges namespaces sequences sequences.private
sets summary system typed vocabs ;
QUALIFIED-WITH: alien.c-types c
QUALIFIED-WITH: sets sets
! Copyright (C) 2009 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors alien.c-types alien.data kernel locals math
-math.ranges math.bitwise math.vectors math.vectors.simd random
+ranges math.bitwise math.vectors math.vectors.simd random
sequences specialized-arrays sequences.private classes.struct
combinators.short-circuit fry ;
SPECIALIZED-ARRAY: uint
! Copyright (C) 2008, 2009 Doug Coleman, Daniel Ehrenberg.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors arrays compiler.units kernel kernel.private
-lexer make math math.ranges namespaces regexp.ast
+lexer make math ranges namespaces regexp.ast
regexp.compiler regexp.negation regexp.parser sequences
sequences.private splitting strings vocabs.loader words ;
IN: regexp
! Copyright (C) 2021 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors arrays calendar combinators combinators.smart
-continuations kernel math math.functions math.parser math.ranges
+continuations kernel math math.functions math.parser ranges
namespaces prettyprint random sequences system threads ;
IN: retries
USING: accessors arrays assocs calendar colors.constants
combinators combinators.short-circuit documents
documents.elements fonts fry grouping kernel literals locals
-make math math.functions math.order math.ranges math.rectangles
+make math math.functions math.order ranges math.rectangles
math.vectors models models.arrow namespaces opengl opengl.gl
sequences sorting splitting system timers ui.baseline-alignment
ui.clipboards ui.commands ui.gadgets ui.gadgets.borders
! Copyright (C) 2009 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors arrays combinators fry kernel math
-math.functions math.order math.ranges math.vectors namespaces
+math.functions math.order ranges math.vectors namespaces
opengl sequences ui.gadgets ui.gadgets.scrollers
ui.gadgets.viewports ui.render ui.text ui.theme ;
IN: ui.gadgets.line-support
-USING: help.markup help.syntax math math.ranges ui.gadgets
+USING: help.markup help.syntax math ranges ui.gadgets
ui.gadgets.sliders.private ;
IN: ui.gadgets.sliders
USING: arrays ascii assocs byte-arrays combinators
combinators.short-circuit grouping hashtables interval-sets
io.encodings.utf8 io.files kernel locals make math math.bitwise
-math.order math.parser math.ranges memoize namespaces sequences
+math.order math.parser ranges memoize namespaces sequences
sets simple-flat-file sorting splitting strings.parser ;
IN: unicode.data
strings unicode.breaks.private unicode.case.private
unicode.categories unicode.collation unicode.collation.private
unicode.data unicode.data.private unicode.normalize.private
-unicode.script locals math.ranges ;
+unicode.script locals ranges ;
IN: unicode
CATEGORY: blank Zs Zl Zp | "\r\n\t" member? ;
! Copyright (C) 2008 John Benediktsson
! See http://factorcode.org/license.txt for BSD license
USING: byte-arrays calendar checksums checksums.md5
-checksums.sha endian kernel math math.parser math.ranges
+checksums.sha endian kernel math math.parser ranges
random sequences strings system unicode ;
IN: uuid
! Copyright (C) 2006, 2010 Slava Pestov
! See http://factorcode.org/license.txt for BSD license.
USING: arrays assocs classes continuations hashtables kernel
-make math math.functions math.parser math.ranges namespaces
+make math math.functions math.parser ranges namespaces
quotations regexp sequences sets unicode words xmode.catalog ;
IN: validators
)
! DPI_AWARENESS_CONTEXT experimentally:
-! USE: math.ranges -100 1000 [a..b] [ <alien> IsValidDpiAwarenessContext ] zip-with
+! USE: ranges -100 1000 [a..b] [ <alien> IsValidDpiAwarenessContext ] zip-with
! [ nip 0 > ] assoc-filter keys .
! { -5 -4 -3 -2 -1 17 18 34 273 529 785 }
! Copyright (C) 2007, 2009 Chris Double, Doug Coleman, Eduardo
! Cavazos, Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
-USING: arrays combinators kernel kernel.private math math.ranges
+USING: arrays combinators kernel kernel.private math ranges
memoize.private sequences ;
IN: generalizations
+++ /dev/null
-Slava Pestov
-Doug Coleman
+++ /dev/null
-USING: help.syntax help.markup arrays sequences ;
-IN: math.ranges
-
-ARTICLE: "math.ranges" "Numeric ranges"
-"A " { $emphasis "range" } " is a virtual sequence with real number elements "
-"ranging from " { $emphasis "a" } " to " { $emphasis "b" } " by " { $emphasis "step" } ". Ascending as well as descending ranges are supported."
-$nl
-"The class of ranges:"
-{ $subsections range }
-"Creating ranges with integer end-points. The standard mathematical convention is used, where " { $snippet "(" } " or " { $snippet ")" } " denotes that the end-point itself " { $emphasis "is not" } " part of the range; " { $snippet "[" } " or " { $snippet "]" } " denotes that the end-point " { $emphasis "is" } " part of the range:"
-{ $subsections
- [a..b]
- (a..b]
- [a..b)
- (a..b)
- [0..b]
- [1..b]
- [0..b)
-}
-"Creating general ranges:"
-{ $subsections <range> }
-"Ranges are most frequently used with sequence combinators as a means of iterating over integers. For example,"
-{ $code "3 10 [a..b] [ sqrt ] map" }
-"Computing the factorial of 100 with a descending range:"
-{ $code "100 1 [a..b] product" }
-"A range can be converted into a concrete sequence using a word such as " { $link >array } ". In most cases this is unnecessary since ranges implement the sequence protocol already. It is necessary if a mutable sequence is needed, for use with words such as " { $link set-nth } " or " { $link map! } "." ;
-
-ABOUT: "math.ranges"
+++ /dev/null
-USING: arrays kernel math math.ranges sequences sets tools.test ;
-
-{ { } } [ 1 1 (a..b) >array ] unit-test
-{ { } } [ 1 1 (a..b] >array ] unit-test
-{ { } } [ 1 1 [a..b) >array ] unit-test
-{ { 1 } } [ 1 1 [a..b] >array ] unit-test
-
-{ { } } [ 1 2 (a..b) >array ] unit-test
-{ { 2 } } [ 1 2 (a..b] >array ] unit-test
-{ { 1 } } [ 1 2 [a..b) >array ] unit-test
-{ { 1 2 } } [ 1 2 [a..b] >array ] unit-test
-
-{ { } } [ 2 1 (a..b) >array ] unit-test
-{ { 1 } } [ 2 1 (a..b] >array ] unit-test
-{ { 2 } } [ 2 1 [a..b) >array ] unit-test
-{ { 2 1 } } [ 2 1 [a..b] >array ] unit-test
-
-{ { 1 2 3 4 5 } } [ 1 5 1 <range> >array ] unit-test
-{ { 5 4 3 2 1 } } [ 5 1 -1 <range> >array ] unit-test
-
-{ { 0 1/3 2/3 1 } } [ 0 1 1/3 <range> >array ] unit-test
-{ { 0 1/3 2/3 1 } } [ 1 0 -1/3 <range> >array reverse ] unit-test
-
-{ 0 } [ 0 -1 .0001 <range> length ] unit-test
-{ 0 } [ 0 -1 .5 <range> length ] unit-test
-{ 0 } [ 0 -1 1 <range> length ] unit-test
-{ 0 } [ 0 -1 2 <range> length ] unit-test
-{ 0 } [ 0 -1 3 <range> length ] unit-test
-{ 0 } [ 0 -1 4 <range> length ] unit-test
-
-{ 0 } [ 0 -2 .0001 <range> length ] unit-test
-{ 0 } [ 0 -2 1 <range> length ] unit-test
-{ 0 } [ 0 -2 2 <range> length ] unit-test
-{ 0 } [ 0 -2 3 <range> length ] unit-test
-{ 0 } [ 0 -2 4 <range> length ] unit-test
-
-{ 0 } [ -1 0 -.0001 <range> length ] unit-test
-{ 0 } [ -1 0 -.5 <range> length ] unit-test
-{ 0 } [ -1 0 -1 <range> length ] unit-test
-{ 0 } [ -1 0 -2 <range> length ] unit-test
-{ 0 } [ -1 0 -3 <range> length ] unit-test
-{ 0 } [ -1 0 -4 <range> length ] unit-test
-
-{ 0 } [ -2 0 -.0001 <range> length ] unit-test
-{ 0 } [ -2 0 -1 <range> length ] unit-test
-{ 0 } [ -2 0 -2 <range> length ] unit-test
-{ 0 } [ -2 0 -3 <range> length ] unit-test
-{ 0 } [ -2 0 -4 <range> length ] unit-test
-
-{ 100 } [
- 1 100 [a..b] [ 2^ [1..b] ] map members length
-] unit-test
-
-{ t } [ -10 10 1 <range> [ sum ] [ >array sum ] bi = ] unit-test
-{ t } [ -10 10 2 <range> [ sum ] [ >array sum ] bi = ] unit-test
-{ t } [ 10 -10 -1 <range> [ sum ] [ >array sum ] bi = ] unit-test
-{ t } [ 10 -10 -2 <range> [ sum ] [ >array sum ] bi = ] unit-test
+++ /dev/null
-! Copyright (C) 2008, 2010 Slava Pestov.
-! See http://factorcode.org/license.txt for BSD license.
-USING: accessors classes.tuple kernel math math.order sequences
-sequences.private ;
-IN: math.ranges
-
-TUPLE: range
-{ from read-only }
-{ length read-only }
-{ step read-only } ;
-
-<PRIVATE
-
-: sign/mod ( x y -- z w )
- [ [ /i ] 2keep pick * - ] keep 0 < [ neg ] when ; inline
-
-PRIVATE>
-
-: <range> ( a b step -- range )
- [ over - ] dip
- [ sign/mod 0 < [ 1 + ] unless 0 max ] keep
- range boa ; inline
-
-M: range length length>> ; inline
-
-M: range nth-unsafe
- [ step>> * ] keep from>> + ; inline
-
-! We want M\ tuple hashcode, not M\ sequence hashcode here!
-! sequences hashcode is O(n) in number of elements
-M: range hashcode* tuple-hashcode ;
-
-INSTANCE: range immutable-sequence
-
-M: range sum [ length ] [ first ] [ last ] tri + * 2 / ;
-
-<PRIVATE
-
-: twiddle ( a b -- a b step ) 2dup > -1 1 ? ; inline
-
-: (a.. ( a b step -- a' b' step ) dup [ + ] curry 2dip ; inline
-
-: ..b) ( a b step -- a' b' step ) dup [ - ] curry dip ; inline
-
-PRIVATE>
-
-: [a..b] ( a b -- range ) twiddle <range> ; inline
-
-: (a..b] ( a b -- range ) twiddle (a.. <range> ; inline
-
-: [a..b) ( a b -- range ) twiddle ..b) <range> ; inline
-
-: (a..b) ( a b -- range ) twiddle (a.. ..b) <range> ; inline
-
-: [0..b] ( b -- range ) 0 swap [a..b] ; inline
-
-: [1..b] ( b -- range ) 1 swap [a..b] ; inline
-
-: [0..b) ( b -- range ) 0 swap [a..b) ; inline
-
-: [1..b) ( b -- range ) 1 swap [a..b) ; inline
-
-! backwards compatibility for new syntax
-ALIAS: [a,b] [a..b] deprecated
-ALIAS: (a,b] (a..b] deprecated
-ALIAS: [a,b) [a..b) deprecated
-ALIAS: (a,b) (a..b) deprecated
-ALIAS: [0,b] [0..b] deprecated
-ALIAS: [1,b] [1..b] deprecated
-ALIAS: [0,b) [0..b) deprecated
-ALIAS: [1,b) [1..b) deprecated
+++ /dev/null
-Virtual sequence consisting of a range of numbers
--- /dev/null
+Slava Pestov
+Doug Coleman
--- /dev/null
+USING: help.syntax help.markup arrays sequences ;
+IN: ranges
+
+ARTICLE: "ranges" "Numeric ranges"
+"A " { $emphasis "range" } " is a virtual sequence with real number elements "
+"ranging from " { $emphasis "a" } " to " { $emphasis "b" } " by " { $emphasis "step" } ". Ascending as well as descending ranges are supported."
+$nl
+"The class of ranges:"
+{ $subsections range }
+"Creating ranges with integer end-points. The standard mathematical convention is used, where " { $snippet "(" } " or " { $snippet ")" } " denotes that the end-point itself " { $emphasis "is not" } " part of the range; " { $snippet "[" } " or " { $snippet "]" } " denotes that the end-point " { $emphasis "is" } " part of the range:"
+{ $subsections
+ [a..b]
+ (a..b]
+ [a..b)
+ (a..b)
+ [0..b]
+ [1..b]
+ [0..b)
+}
+"Creating general ranges:"
+{ $subsections <range> }
+"Ranges are most frequently used with sequence combinators as a means of iterating over integers. For example,"
+{ $code "3 10 [a..b] [ sqrt ] map" }
+"Computing the factorial of 100 with a descending range:"
+{ $code "100 1 [a..b] product" }
+"A range can be converted into a concrete sequence using a word such as " { $link >array } ". In most cases this is unnecessary since ranges implement the sequence protocol already. It is necessary if a mutable sequence is needed, for use with words such as " { $link set-nth } " or " { $link map! } "." ;
+
+ABOUT: "ranges"
--- /dev/null
+USING: arrays kernel math ranges sequences sets tools.test ;
+
+{ { } } [ 1 1 (a..b) >array ] unit-test
+{ { } } [ 1 1 (a..b] >array ] unit-test
+{ { } } [ 1 1 [a..b) >array ] unit-test
+{ { 1 } } [ 1 1 [a..b] >array ] unit-test
+
+{ { } } [ 1 2 (a..b) >array ] unit-test
+{ { 2 } } [ 1 2 (a..b] >array ] unit-test
+{ { 1 } } [ 1 2 [a..b) >array ] unit-test
+{ { 1 2 } } [ 1 2 [a..b] >array ] unit-test
+
+{ { } } [ 2 1 (a..b) >array ] unit-test
+{ { 1 } } [ 2 1 (a..b] >array ] unit-test
+{ { 2 } } [ 2 1 [a..b) >array ] unit-test
+{ { 2 1 } } [ 2 1 [a..b] >array ] unit-test
+
+{ { 1 2 3 4 5 } } [ 1 5 1 <range> >array ] unit-test
+{ { 5 4 3 2 1 } } [ 5 1 -1 <range> >array ] unit-test
+
+{ { 0 1/3 2/3 1 } } [ 0 1 1/3 <range> >array ] unit-test
+{ { 0 1/3 2/3 1 } } [ 1 0 -1/3 <range> >array reverse ] unit-test
+
+{ 0 } [ 0 -1 .0001 <range> length ] unit-test
+{ 0 } [ 0 -1 .5 <range> length ] unit-test
+{ 0 } [ 0 -1 1 <range> length ] unit-test
+{ 0 } [ 0 -1 2 <range> length ] unit-test
+{ 0 } [ 0 -1 3 <range> length ] unit-test
+{ 0 } [ 0 -1 4 <range> length ] unit-test
+
+{ 0 } [ 0 -2 .0001 <range> length ] unit-test
+{ 0 } [ 0 -2 1 <range> length ] unit-test
+{ 0 } [ 0 -2 2 <range> length ] unit-test
+{ 0 } [ 0 -2 3 <range> length ] unit-test
+{ 0 } [ 0 -2 4 <range> length ] unit-test
+
+{ 0 } [ -1 0 -.0001 <range> length ] unit-test
+{ 0 } [ -1 0 -.5 <range> length ] unit-test
+{ 0 } [ -1 0 -1 <range> length ] unit-test
+{ 0 } [ -1 0 -2 <range> length ] unit-test
+{ 0 } [ -1 0 -3 <range> length ] unit-test
+{ 0 } [ -1 0 -4 <range> length ] unit-test
+
+{ 0 } [ -2 0 -.0001 <range> length ] unit-test
+{ 0 } [ -2 0 -1 <range> length ] unit-test
+{ 0 } [ -2 0 -2 <range> length ] unit-test
+{ 0 } [ -2 0 -3 <range> length ] unit-test
+{ 0 } [ -2 0 -4 <range> length ] unit-test
+
+{ 100 } [
+ 1 100 [a..b] [ 2^ [1..b] ] map members length
+] unit-test
+
+{ t } [ -10 10 1 <range> [ sum ] [ >array sum ] bi = ] unit-test
+{ t } [ -10 10 2 <range> [ sum ] [ >array sum ] bi = ] unit-test
+{ t } [ 10 -10 -1 <range> [ sum ] [ >array sum ] bi = ] unit-test
+{ t } [ 10 -10 -2 <range> [ sum ] [ >array sum ] bi = ] unit-test
--- /dev/null
+! Copyright (C) 2008, 2010 Slava Pestov.
+! See http://factorcode.org/license.txt for BSD license.
+USING: accessors classes.tuple kernel math math.order sequences
+sequences.private ;
+IN: ranges
+
+TUPLE: range
+{ from read-only }
+{ length read-only }
+{ step read-only } ;
+
+<PRIVATE
+
+: sign/mod ( x y -- z w )
+ [ [ /i ] 2keep pick * - ] keep 0 < [ neg ] when ; inline
+
+PRIVATE>
+
+: <range> ( a b step -- range )
+ [ over - ] dip
+ [ sign/mod 0 < [ 1 + ] unless 0 max ] keep
+ range boa ; inline
+
+M: range length length>> ; inline
+
+M: range nth-unsafe
+ [ step>> * ] keep from>> + ; inline
+
+! We want M\ tuple hashcode, not M\ sequence hashcode here!
+! sequences hashcode is O(n) in number of elements
+M: range hashcode* tuple-hashcode ;
+
+INSTANCE: range immutable-sequence
+
+M: range sum [ length ] [ first ] [ last ] tri + * 2 / ;
+
+<PRIVATE
+
+: twiddle ( a b -- a b step ) 2dup > -1 1 ? ; inline
+
+: (a.. ( a b step -- a' b' step ) dup [ + ] curry 2dip ; inline
+
+: ..b) ( a b step -- a' b' step ) dup [ - ] curry dip ; inline
+
+PRIVATE>
+
+: [a..b] ( a b -- range ) twiddle <range> ; inline
+
+: (a..b] ( a b -- range ) twiddle (a.. <range> ; inline
+
+: [a..b) ( a b -- range ) twiddle ..b) <range> ; inline
+
+: (a..b) ( a b -- range ) twiddle (a.. ..b) <range> ; inline
+
+: [0..b] ( b -- range ) 0 swap [a..b] ; inline
+
+: [1..b] ( b -- range ) 1 swap [a..b] ; inline
+
+: [0..b) ( b -- range ) 0 swap [a..b) ; inline
+
+: [1..b) ( b -- range ) 1 swap [a..b) ; inline
+
+! backwards compatibility for new syntax
+ALIAS: [a,b] [a..b] deprecated
+ALIAS: (a,b] (a..b] deprecated
+ALIAS: [a,b) [a..b) deprecated
+ALIAS: (a,b) (a..b) deprecated
+ALIAS: [0,b] [0..b] deprecated
+ALIAS: [1,b] [1..b] deprecated
+ALIAS: [0,b) [0..b) deprecated
+ALIAS: [1,b) [1..b) deprecated
--- /dev/null
+Virtual sequence consisting of a range of numbers
{ $description "Like " { $snippet "map sum" } ", but without creating an intermediate sequence." }
{ $examples
{ $example
- "USING: math math.ranges sequences prettyprint ;"
+ "USING: math ranges sequences prettyprint ;"
"100 [1,b] [ sq ] map-sum ."
"338350"
}
{ $description "Efficiently returns the number of elements that the predicate quotation matches." }
{ $examples
{ $example
- "USING: math math.ranges sequences prettyprint ;"
+ "USING: math ranges sequences prettyprint ;"
"100 [1,b] [ even? ] count ."
"50"
}
$nl
"Combinators that produce new sequences, such as " { $link map } ", will output an array if the input is an instance of " { $link <iota> } "."
$nl
-"More elaborate counted loops can be performed with " { $link "math.ranges" } "." ;
+"More elaborate counted loops can be performed with " { $link "ranges" } "." ;
ARTICLE: "sequences-if" "Control flow with sequences"
"To reduce the boilerplate of checking if a sequence is empty, several combinators are provided."
"Using sequences for looping:"
{ $subsections
"sequences-integers"
- "math.ranges"
+ "ranges"
}
"Using sequences for control flow:"
{ $subsections "sequences-if" }
! Copyright (C) 2011 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: ascii combinators combinators.smart io kernel math
-math.parser math.ranges sequences splitting ;
+math.parser ranges sequences splitting ;
IN: 99-bottles
: bottles ( n -- number string )
! Copyright (C) 2009, 2010 Joe Groff, Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: alien.data alien.data.map fry generalizations kernel locals math.vectors
-math.vectors.conversion math math.vectors.simd math.ranges sequences
+math.vectors.conversion math math.vectors.simd ranges sequences
specialized-arrays tools.test ;
FROM: alien.c-types => uchar short int float ;
SPECIALIZED-ARRAYS: int float float-4 uchar-16 ;
! See http://factorcode.org/license.txt for BSD license.
USING: accessors alien alien.c-types alien.data alien.parser arrays
byte-arrays combinators effects.parser fry generalizations grouping kernel
-lexer locals macros make math math.ranges parser sequences
+lexer locals macros make math ranges parser sequences
sequences.generalizations sequences.private ;
FROM: alien.arrays => array-length ;
IN: alien.data.map
parser sequences sequences.generalizations splitting
stack-checker vectors vocabs.parser words locals
io.encodings.ascii io.encodings.string shuffle effects
-math.ranges math.order sorting strings system alien.libraries ;
+ranges math.order sorting strings system alien.libraries ;
QUALIFIED-WITH: alien.c-types c
IN: alien.fortran
! Copyright (C) 2009 Joe Groff.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors timers audio audio.engine audio.loader calendar
-destructors io kernel locals math math.functions math.ranges specialized-arrays
+destructors io kernel locals math math.functions ranges specialized-arrays
sequences random math.vectors ;
FROM: alien.c-types => short ;
SPECIALIZED-ARRAY: short
! Copyright (C) 2008 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
-USING: backtrack shuffle math math.ranges quotations locals fry
+USING: backtrack shuffle math ranges quotations locals fry
kernel words io memoize macros prettyprint sequences assocs
combinators namespaces ;
IN: benchmark.backtrack
! Copyright (C) 2008 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
-USING: kernel math.ranges math.parser sets sequences ;
+USING: kernel ranges math.parser sets sequences ;
IN: benchmark.beust1
: count-numbers ( max -- n )
! Copyright (C) 2008 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
-USING: kernel locals math math.ranges math.parser sequences ;
+USING: kernel locals math ranges math.parser sequences ;
IN: benchmark.beust2
! http://crazybob.org/BeustSequence.java.html
! Copyright (C) 2008, 2010 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
-USING: binary-search kernel literals math.primes math.ranges
+USING: binary-search kernel literals math.primes ranges
sequences ;
IN: benchmark.binary-search
! Copyright (C) 2008, 2010 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
-USING: accessors kernel math math.ranges math.order math.parser
+USING: accessors kernel math ranges math.order math.parser
io locals sequences ;
IN: benchmark.binary-trees
! Copyright (C) 2012 John Benediktsson
! See http://factorcode.org/license.txt for BSD license
-USING: combinators kernel math math.combinatorics math.ranges
+USING: combinators kernel math math.combinatorics ranges
sequences ;
IN: benchmark.combinatorics
! Copyright (C) 2009 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
-USING: decimals kernel locals math math.combinatorics math.ranges
+USING: decimals kernel locals math math.combinatorics ranges
sequences ;
IN: benchmark.e-decimals
! Copyright (C) 2009 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
-USING: kernel math math.combinatorics math.ranges sequences ;
+USING: kernel math math.combinatorics ranges sequences ;
IN: benchmark.e-ratios
: calculate-e-ratios ( n -- e )
! Copyright (C) 2009 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors assocs combinators grouping kernel locals math
-math.parser math.ranges memoize sequences ;
+math.parser ranges memoize sequences ;
IN: benchmark.hashtables
MEMO: strings ( -- str )
! Copyright (C) 2008 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
-USING: kernel math math.ranges sequences locals hints ;
+USING: kernel math ranges sequences locals hints ;
IN: benchmark.nested-empty-loop-2
: times ( seq quot -- ) [ drop ] prepose each ; inline
USING: math math.parser sequences sequences.private kernel
-bit-arrays make io math.ranges multiline fry locals ;
+bit-arrays make io ranges multiline fry locals ;
IN: benchmark.nsieve-bits
: clear-flags ( step i seq -- )
-USING: bit-arrays kernel locals math math.functions math.ranges
+USING: bit-arrays kernel locals math math.functions ranges
sequences ;
IN: benchmark.sieve
! Copyright (C) 2011 John Benediktsson
! See http://factorcode.org/license.txt for BSD license
-USING: arrays assocs kernel math.ranges random sequences sets
+USING: arrays assocs kernel ranges random sequences sets
sorting trees.splay ;
IN: benchmark.splay
fry grouping http.client io io.encodings.binary io.files
io.pathnames io.sockets io.streams.byte-array io.streams.duplex
kernel literals locals make math math.bitwise math.functions
-math.order math.parser math.ranges multiline namespaces
+math.order math.parser ranges multiline namespaces
prettyprint random sequences splitting strings timers
tools.annotations ui ui.gadgets.panes ui.tools.listener urls
urls.encoding ;
! Copyright (C) 2010 Dmitry Shubin.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors arrays assocs kernel locals math math.order
-math.ranges sequences sequences.private z-algorithm ;
+ranges sequences sequences.private z-algorithm ;
IN: boyer-moore
<PRIVATE
! See http://factorcode.org/license.txt for BSD license
USING: brainfuck io.streams.string kernel literals math
-math.parser math.ranges sequences splitting tools.test ;
+math.parser ranges sequences splitting tools.test ;
[ "+" run-brainfuck ] must-infer
[ "+" get-brainfuck ] must-infer
USING: accessors arrays ascii calendar colors colors.gray
combinators.short-circuit fry kernel locals math math.constants
-math.functions math.libm math.order math.points math.ranges
+math.functions math.libm math.order math.points ranges
math.vectors namespaces opengl processing.shapes quotations
random sequences splitting timers ui ui.gadgets
ui.gadgets.borders ui.gadgets.buttons ui.gadgets.frame-buffer
! Copyright (C) 2009 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors combinators combinators.short-circuit
-generalizations kernel locals math.order math.ranges
+generalizations kernel locals math.order ranges
sequences.parser sequences sequences.generalizations
sorting.functor sorting.slots unicode ;
IN: c.lexer
-USING: math.ranges kernel random sequences arrays combinators ;
+USING: ranges kernel random sequences arrays combinators ;
IN: chess960
SYMBOLS: pawn rook knight bishop queen king ;
USING: accessors arrays ascii assocs calendar calendar.english
calendar.private combinators combinators.short-circuit io kernel
-literals locals math math.order math.parser math.ranges
+literals locals math math.order math.parser ranges
sequences splitting ;
IN: crontab
! Some parts Copyright (C) 2008 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors arrays assocs byte-arrays crypto.aes.utils
-generalizations kernel literals math math.bitwise math.ranges
+generalizations kernel literals math math.bitwise ranges
namespaces sequences sequences.private sequences.unrolled ;
IN: crypto.aes
USING: accessors arrays assocs bit-arrays byte-arrays calendar
colors.constants combinators fry kernel kernel.private locals
-math math.order math.ranges namespaces opengl random sequences
+math math.order ranges namespaces opengl random sequences
sequences.private timers ui ui.commands ui.gadgets
ui.gadgets.toolbar ui.gadgets.tracks ui.gestures ui.render words
;
! Copyright (C) 2010 Slava Pestov.
-USING: gml.types gml.printer gml.runtime math math.ranges
+USING: gml.types gml.printer gml.runtime math ranges
continuations combinators arrays kernel vectors accessors
prettyprint fry sequences assocs locals hashtables grouping
sorting models ;
! Copyright (C) 2010 Slava Pestov.
USING: gml.types gml.printer gml.runtime math math.constants
-math.functions math.matrices math.order math.ranges math.trig
+math.functions math.matrices math.order ranges math.trig
math.vectors continuations combinators arrays kernel vectors
accessors prettyprint fry sequences assocs locals hashtables
grouping sorting classes.struct math.vectors.simd
! Copyright (C) 2010 Slava Pestov.
USING: accessors arrays assocs fry generic.parser kernel locals
-locals.parser macros math math.ranges memoize parser sequences
+locals.parser macros math ranges memoize parser sequences
sequences.private strings strings.parser lexer namespaces
vectors words generalizations sequences.generalizations
effects.parser gml.types ;
game.loop game.models.half-edge game.worlds gml.printer gpu
gpu.buffers gpu.framebuffers gpu.render gpu.shaders gpu.state
gpu.util.wasd growable images kernel literals locals math
-math.order math.ranges math.vectors math.vectors.conversion
+math.order ranges math.vectors math.vectors.conversion
math.vectors.simd math.vectors.simd.cords method-chains models
namespaces sequences sets specialized-vectors typed ui
ui.gadgets ui.gadgets.worlds ui.gestures ui.pixel-formats
! Copyright (C) 2009 Joe Groff.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors alien.data.map arrays destructors fry grouping
-kernel math math.ranges math.vectors.simd opengl opengl.gl sequences
+kernel math ranges math.vectors.simd opengl opengl.gl sequences
sequences.product specialized-arrays ;
FROM: alien.c-types => float ;
SPECIALIZED-ARRAY: float-4
USING: accessors combinators combinators.short-circuit
continuations formatting fry io kernel math math.functions
-math.order math.parser math.ranges random sequences strings ;
+math.order math.parser ranges random sequences strings ;
IN: hamurabi
USING: accessors byte-arrays calendar checksums
checksums.openssl classes.tuple formatting io.encodings.ascii
io.encodings.string kernel literals math math.functions
-math.parser math.ranges present random sequences splitting ;
+math.parser ranges present random sequences splitting ;
IN: hashcash
! Hashcash implementation
! See http://factorcode.org/license.txt for BSD license
USING: assocs combinators.short-circuit kernel make math
-math.order math.parser math.ranges regexp sequences splitting
+math.order math.parser ranges regexp sequences splitting
strings ;
IN: html.entities
! Copyright (C) 2009 Tim Wawrzynczak, Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: sequences io io.encodings.binary io.files io.pathnames
-strings kernel math io.mmap accessors combinators math.ranges
+strings kernel math io.mmap accessors combinators ranges
unicode byte-arrays io.encodings.string
io.encodings.utf16 assocs math.parser combinators.short-circuit
fry namespaces combinators.smart splitting io.encodings.ascii
! See http://factorcode.org/license.txt for BSD license.
USING: accessors endian images images.loader io kernel
locals math sequences io.encodings.ascii io.encodings.string
-calendar math.ranges math.parser colors arrays hashtables
+calendar ranges math.parser colors arrays hashtables
ui.pixel-formats combinators continuations io.streams.throwing ;
IN: images.tga
USING: accessors arrays assocs calendar calendar.format calendar.parser
combinators continuations destructors formatting fry grouping.extras imap
-imap.private io.streams.duplex kernel math math.parser math.ranges
+imap.private io.streams.duplex kernel math math.parser ranges
namespaces random sequences sets sorting uuid multiline
splitting strings system tools.test memoize combinators.smart ;
FROM: pcre => findall ;
USING: accessors combinators combinators.short-circuit effects
effects.parser fry infix.ast infix.parser kernel locals
locals.parser locals.types math math.functions math.order
-math.ranges multiline parser quotations sequences summary
+ranges multiline parser quotations sequences summary
vocabs.parser words words.constant ;
IN: infix
USING: accessors arrays assocs destructors environment
formatting fry io io.streams.string io.styles kernel locals
-math math.functions math.ranges math.vectors namespaces
+math math.functions ranges math.vectors namespaces
sequences sequences.extras strings strings.tables ;
IN: io.streams.256color
! See http://factorcode.org/license.txt for BSD license.
USING: accessors colors.constants combinators jamshred.log
jamshred.oint jamshred.sound jamshred.tunnel kernel locals math
-math.constants math.order math.ranges math.vectors math.matrices
+math.constants math.order ranges math.vectors math.matrices
sequences shuffle specialized-arrays strings system ;
QUALIFIED-WITH: alien.c-types c
SPECIALIZED-ARRAY: c:float
! See http://factorcode.org/license.txt for BSD license.
USING: accessors arrays colors combinators fry jamshred.oint
kernel literals locals math math.constants math.matrices
-math.order math.quadratic math.ranges math.vectors random
+math.order math.quadratic ranges math.vectors random
sequences specialized-arrays vectors ;
FROM: jamshred.oint => distance ;
FROM: alien.c-types => float ;
! See http://factorcode.org/license.txt for BSD license.
USING: accessors assocs calendar continuations destructors io
io.encodings.binary io.servers io.sockets
-io.streams.duplex fry kernel locals math math.ranges multiline
+io.streams.duplex fry kernel locals math ranges multiline
namespaces prettyprint random sequences sets splitting threads
tools.continuations ;
IN: managed-server
! Copyright (C) 2009 Jason W. Merrill.
! See http://factorcode.org/license.txt for BSD license.
-USING: accessors effects kernel lexer math.ranges parser
+USING: accessors effects kernel lexer ranges parser
sequences words ;
IN: math.derivatives.syntax
! Copyright (C) 2012 John Benediktsson
! See http://factorcode.org/license.txt for BSD license
-USING: arrays kernel math math.extras math.ranges sequences
+USING: arrays kernel math math.extras ranges sequences
tools.test ;
{ 7 } [ 4 2 stirling ] unit-test
combinators combinators.short-circuit compression.zlib fry
grouping kernel locals math math.bitwise math.combinatorics
math.constants math.functions math.order math.primes
-math.primes.factors math.ranges math.ranges.private
+math.primes.factors ranges ranges.private
math.statistics math.vectors memoize parser random sequences
sequences.extras sequences.private sets sorting sorting.extras ;
-USING: kernel math.factorials math.functions math.ranges sequences tools.test ;
+USING: kernel math.factorials math.functions ranges sequences tools.test ;
{ 1 } [ -1 factorial ] unit-test ! not necessarily correct
{ 1 } [ 0 factorial ] unit-test
! See http://factorcode.org/license.txt for BSD license
USING: combinators combinators.short-circuit fry inverse kernel
-math math.functions math.primes math.ranges memoize sequences ;
+math math.functions math.primes ranges memoize sequences ;
IN: math.factorials
! Copyright (C) 2008 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
-USING: kernel math math.ranges math.vectors namespaces
+USING: kernel math ranges math.vectors namespaces
sequences ;
IN: math.numerical-integration
! See http://factorcode.org/license.txt for BSD license
USING: combinators kernel locals math math.extras
-math.extras.private math.functions math.ranges random sequences ;
+math.extras.private math.functions ranges random sequences ;
IN: math.primes.solovay-strassen
-USING: calendar math fry kernel assocs math.ranges bson.reader io.streams.byte-array
+USING: calendar math fry kernel assocs ranges bson.reader io.streams.byte-array
sequences formatting combinators namespaces io tools.time prettyprint io.encodings.binary
accessors words mongodb.driver strings math.parser bson.writer
hashtables ;
! Copyright (C) 2009 Joe Groff
! See http://factorcode.org/license.txt for BSD license
USING: accessors alien.c-types grouping kernel locals math
-math.order math.ranges math.vectors math.vectors.homogeneous
+math.order ranges math.vectors math.vectors.homogeneous
sequences specialized-arrays ;
SPECIALIZED-ARRAY: alien.c-types:float
IN: nurbs
USING: accessors arrays assocs continuations http.client kernel
-literals math math.parser math.ranges pcre pcre.ffi pcre.private
+literals math math.parser ranges pcre pcre.ffi pcre.private
random sequences system tools.test ;
QUALIFIED: regexp
QUALIFIED: splitting
! See http://factorcode.org/license.txt for BSD license
USING: accessors assocs calendar combinators environment fonts
formatting fry io io.streams.string kernel literals locals make
-math math.order math.ranges namespaces pdf.canvas pdf.values
+math math.order ranges namespaces pdf.canvas pdf.values
pdf.wrap sequences sequences.extras sorting splitting ui.text
xml.entities ;
FROM: pdf.canvas => draw-text ;
! Copyright (C) 2011 John Benediktsson
! See http://factorcode.org/license.txt for BSD license
-USING: kernel literals math math.functions math.ranges picomath
+USING: kernel literals math math.functions ranges picomath
sequences tools.test ;
IN: picomath
USING: accessors arrays calendar colors.constants
combinators.short-circuit fonts fry kernel literals locals math
-math.order math.ranges math.vectors namespaces opengl random
+math.order ranges math.vectors namespaces opengl random
sequences timers ui ui.commands ui.gadgets ui.gadgets.worlds
ui.gestures ui.pens.solid ui.render ui.text ;
USING: accessors annotations arrays assocs calendar combinators
fry hashtables io io.crlf io.encodings.utf8 io.sockets
io.streams.duplex io.timeouts kernel make math math.parser
-math.ranges namespaces prettyprint sequences splitting
+ranges namespaces prettyprint sequences splitting
strings ;
IN: pop3
! Copyright (c) 2007-2009 Aaron Schaefer, Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
-USING: kernel math math.functions math.ranges project-euler.common sequences
+USING: kernel math math.functions ranges project-euler.common sequences
sets ;
IN: project-euler.001
! Copyright (c) 2007 Aaron Schaefer, Daniel Ehrenberg.
! See http://factorcode.org/license.txt for BSD license.
-USING: hashtables kernel math math.functions math.ranges project-euler.common
+USING: hashtables kernel math math.functions ranges project-euler.common
sequences sorting sets ;
IN: project-euler.004
! Copyright (c) 2007, 2009 Aaron Schaefer.
! See http://factorcode.org/license.txt for BSD license.
-USING: math math.functions math.ranges project-euler.common sequences ;
+USING: math math.functions ranges project-euler.common sequences ;
IN: project-euler.005
! http://projecteuler.net/index.php?section=problems&id=5
! Copyright (c) 2007, 2008 Aaron Schaefer.
! See http://factorcode.org/license.txt for BSD license.
-USING: kernel math math.ranges sequences project-euler.common ;
+USING: kernel math ranges sequences project-euler.common ;
IN: project-euler.006
! http://projecteuler.net/index.php?section=problems&id=6
! Copyright (c) 2007 Aaron Schaefer.
! See http://factorcode.org/license.txt for BSD license.
-USING: combinators.short-circuit kernel make math math.functions math.ranges
+USING: combinators.short-circuit kernel make math math.functions ranges
sequences project-euler.common ;
IN: project-euler.014
! Copyright (c) 2007, 2008 Aaron Schaefer.
! See http://factorcode.org/license.txt for BSD license.
-USING: ascii kernel math.ranges math.text.english sequences
+USING: ascii kernel ranges math.text.english sequences
project-euler.common ;
IN: project-euler.017
! Copyright (c) 2007 Samuel Tardieu, Aaron Schaefer.
! See http://factorcode.org/license.txt for BSD license.
-USING: kernel math math.ranges project-euler.common sequences ;
+USING: kernel math ranges project-euler.common sequences ;
IN: project-euler.018
! http://projecteuler.net/index.php?section=problems&id=18
! Copyright (c) 2007 Samuel Tardieu, Aaron Schaefer.
! See http://factorcode.org/license.txt for BSD license.
-USING: calendar combinators kernel math math.ranges namespaces sequences
+USING: calendar combinators kernel math ranges namespaces sequences
math.order project-euler.common ;
IN: project-euler.019
! Copyright (c) 2007 Aaron Schaefer.
! See http://factorcode.org/license.txt for BSD license.
USING: combinators.short-circuit kernel math math.functions
- math.ranges namespaces project-euler.common sequences ;
+ ranges namespaces project-euler.common sequences ;
IN: project-euler.021
! http://projecteuler.net/index.php?section=problems&id=21
! Copyright (c) 2008 Aaron Schaefer.
! See http://factorcode.org/license.txt for BSD license.
-USING: fry kernel math math.ranges project-euler.common
+USING: fry kernel math ranges project-euler.common
sequences sets ;
IN: project-euler.023
! Copyright (c) 2008 Aaron Schaefer.
! See http://factorcode.org/license.txt for BSD license.
-USING: kernel math math.functions math.primes math.ranges sequences project-euler.common ;
+USING: kernel math math.functions math.primes ranges sequences project-euler.common ;
IN: project-euler.026
! http://projecteuler.net/index.php?section=problems&id=26
! Copyright (c) 2008 Aaron Schaefer.
! See http://factorcode.org/license.txt for BSD license.
-USING: kernel math math.primes math.ranges project-euler.common sequences ;
+USING: kernel math math.primes ranges project-euler.common sequences ;
IN: project-euler.027
! http://projecteuler.net/index.php?section=problems&id=27
! Copyright (c) 2008 Aaron Schaefer.
! See http://factorcode.org/license.txt for BSD license.
-USING: kernel math math.ranges sequences project-euler.common ;
+USING: kernel math ranges sequences project-euler.common ;
IN: project-euler.028
! http://projecteuler.net/index.php?section=problems&id=28
! Copyright (c) 2008 Aaron Schaefer.
! See http://factorcode.org/license.txt for BSD license.
-USING: hashtables kernel math.functions math.ranges project-euler.common
+USING: hashtables kernel math.functions ranges project-euler.common
sequences sets ;
IN: project-euler.029
! Copyright (c) 2008 Aaron Schaefer.
! See http://factorcode.org/license.txt for BSD license.
-USING: kernel math math.functions math.ranges project-euler.common sequences ;
+USING: kernel math math.functions ranges project-euler.common sequences ;
IN: project-euler.030
! http://projecteuler.net/index.php?section=problems&id=30
! Copyright (c) 2008 Aaron Schaefer.
! See http://factorcode.org/license.txt for BSD license.
-USING: kernel math math.combinatorics math.functions math.parser math.ranges
+USING: kernel math math.combinatorics math.functions math.parser ranges
project-euler.common sequences sets ;
IN: project-euler.032
! Copyright (c) 2008 Aaron Schaefer.
! See http://factorcode.org/license.txt for BSD license.
-USING: kernel math math.ranges project-euler.common sequences ;
+USING: kernel math ranges project-euler.common sequences ;
IN: project-euler.033
! http://projecteuler.net/index.php?section=problems&id=33
! Copyright (c) 2008 Aaron Schaefer.
! See http://factorcode.org/license.txt for BSD license.
-USING: kernel math.ranges project-euler.common sequences ;
+USING: kernel ranges project-euler.common sequences ;
IN: project-euler.034
! http://projecteuler.net/index.php?section=problems&id=34
! Copyright (c) 2008 Aaron Schaefer.
! See http://factorcode.org/license.txt for BSD license.
-USING: combinators.short-circuit kernel math.parser math.ranges
+USING: combinators.short-circuit kernel math.parser ranges
project-euler.common sequences ;
IN: project-euler.036
! Copyright (c) 2008 Aaron Schaefer.
! See http://factorcode.org/license.txt for BSD license.
-USING: kernel math math.ranges project-euler.common sequences
+USING: kernel math ranges project-euler.common sequences
strings ;
IN: project-euler.038
! Copyright (c) 2008 Aaron Schaefer.
! See http://factorcode.org/license.txt for BSD license.
-USING: arrays kernel math math.ranges namespaces project-euler.common
+USING: arrays kernel math ranges namespaces project-euler.common
sequences sequences.extras ;
IN: project-euler.039
! Copyright (c) 2008 Aaron Schaefer.
! See http://factorcode.org/license.txt for BSD license.
USING: combinators.short-circuit kernel math math.functions math.combinatorics
- math.ranges project-euler.common sequences sets sorting ;
+ ranges project-euler.common sequences sets sorting ;
IN: project-euler.043
! http://projecteuler.net/index.php?section=problems&id=43
! Copyright (c) 2008 Aaron Schaefer.
! See http://factorcode.org/license.txt for BSD license.
-USING: kernel math math.functions math.ranges math.order
+USING: kernel math math.functions ranges math.order
project-euler.common sequences layouts ;
IN: project-euler.044
! Copyright (c) 2008 Aaron Schaefer.
! See http://factorcode.org/license.txt for BSD license.
-USING: kernel math math.functions math.primes math.ranges
+USING: kernel math math.functions math.primes ranges
sequences project-euler.common math.bitwise ;
IN: project-euler.046
! Copyright (c) 2008 Aaron Schaefer.
! See http://factorcode.org/license.txt for BSD license.
USING: arrays kernel math math.primes math.primes.factors
- math.ranges namespaces sequences project-euler.common ;
+ ranges namespaces sequences project-euler.common ;
IN: project-euler.047
! http://projecteuler.net/index.php?section=problems&id=47
! Copyright (c) 2008 Aaron Schaefer.
! See http://factorcode.org/license.txt for BSD license.
-USING: kernel math math.functions math.ranges
+USING: kernel math math.functions ranges
project-euler.common sequences ;
IN: project-euler.048
! for each prime number, count the families it belongs to. When one reaches count of 8, stop, and get the smallest number by replacing * with ones.
USING: assocs fry kernel math math.combinatorics math.functions
-math.order math.parser math.primes math.ranges namespaces
+math.order math.parser math.primes ranges namespaces
project-euler.common sequences sets ;
IN: project-euler.051
<PRIVATE
! Copyright (c) 2008 Aaron Schaefer.
! See http://factorcode.org/license.txt for BSD license.
-USING: kernel math math.combinatorics math.ranges sequences project-euler.common ;
+USING: kernel math math.combinatorics ranges sequences project-euler.common ;
IN: project-euler.053
! http://projecteuler.net/index.php?section=problems&id=53
! Copyright (c) 2008 Aaron Schaefer.
! See http://factorcode.org/license.txt for BSD license.
-USING: kernel math math.ranges project-euler.common sequences ;
+USING: kernel math ranges project-euler.common sequences ;
IN: project-euler.055
! http://projecteuler.net/index.php?section=problems&id=55
! Copyright (c) 2008 Aaron Schaefer.
! See http://factorcode.org/license.txt for BSD license.
-USING: kernel math.functions math.ranges project-euler.common
+USING: kernel math.functions ranges project-euler.common
sequences math.order ;
IN: project-euler.056
! Copyright (c) 2008 Samuel Tardieu
! See http://factorcode.org/license.txt for BSD license.
-USING: kernel math math.functions math.parser math.ranges project-euler.common
+USING: kernel math math.functions math.parser ranges project-euler.common
sequences ;
IN: project-euler.057
! Copyright (c) 2009 Aaron Schaefer.
! See http://factorcode.org/license.txt for BSD license.
-USING: fry kernel math math.primes math.ranges project-euler.common sequences ;
+USING: fry kernel math math.primes ranges project-euler.common sequences ;
IN: project-euler.058
! http://projecteuler.net/index.php?section=problems&id=58
! Copyright (c) 2009 Aaron Schaefer.
! See http://factorcode.org/license.txt for BSD license.
-USING: kernel math math.functions math.ranges project-euler.common sequences ;
+USING: kernel math math.functions ranges project-euler.common sequences ;
IN: project-euler.063
! http://projecteuler.net/index.php?section=problems&id=63
USING: accessors arrays classes.tuple io kernel locals math
-math.functions math.ranges prettyprint project-euler.common
+math.functions ranges prettyprint project-euler.common
sequences ;
IN: project-euler.064
! Copyright (c) 2009 Aaron Schaefer.
! See http://factorcode.org/license.txt for BSD license.
USING: combinators fry kernel math math.primes math.primes.factors
-math.ranges project-euler.common sequences sequences.extras ;
+ranges project-euler.common sequences sequences.extras ;
IN: project-euler.069
! http://projecteuler.net/index.php?section=problems&id=69
! Copyright (c) 2009 Guillaume Nargeot.
! See http://factorcode.org/license.txt for BSD license.
-USING: kernel math math.primes.factors math.ranges
+USING: kernel math math.primes.factors ranges
project-euler.common sequences ;
IN: project-euler.072
! Copyright (c) 2009 Guillaume Nargeot.
! See http://factorcode.org/license.txt for BSD license.
-USING: hash-sets kernel math.ranges project-euler.common
+USING: hash-sets kernel ranges project-euler.common
sequences sets ;
IN: project-euler.074
! Copyright (c) 2008 Aaron Schaefer.
! See http://factorcode.org/license.txt for BSD license.
-USING: arrays kernel math math.ranges
+USING: arrays kernel math ranges
namespaces project-euler.common sequences ;
IN: project-euler.075
! Copyright (c) 2008 Eric Mertens.
! See http://factorcode.org/license.txt for BSD license.
-USING: arrays assocs kernel locals math math.order math.ranges sequences project-euler.common ;
+USING: arrays assocs kernel locals math math.order ranges sequences project-euler.common ;
IN: project-euler.076
! http://projecteuler.net/index.php?section=problems&id=76
! Copyright (c) 2009 Guillaume Nargeot.
! See http://factorcode.org/license.txt for BSD license.
USING: fry io.encodings.ascii io.files locals kernel math
-math.order math.parser math.ranges sequences splitting
+math.order math.parser ranges sequences splitting
project-euler.common ;
IN: project-euler.081
! Copyright (c) 2009 Guillaume Nargeot.
! See http://factorcode.org/license.txt for BSD license.
-USING: accessors kernel math math.ranges project-euler.common
+USING: accessors kernel math ranges project-euler.common
sequences locals ;
IN: project-euler.085
! Copyright (c) 2008 Aaron Schaefer, Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
-USING: kernel math math.ranges project-euler.common sequences ;
+USING: kernel math ranges project-euler.common sequences ;
IN: project-euler.092
! http://projecteuler.net/index.php?section=problems&id=92
! Copyright (c) 2008 Eric Mertens.
! See http://factorcode.org/license.txt for BSD license.
-USING: kernel math math.ranges sequences project-euler.common ;
+USING: kernel math ranges sequences project-euler.common ;
IN: project-euler.116
! http://projecteuler.net/index.php?section=problems&id=116
! Copyright (c) 2009 Guillaume Nargeot.
! See http://factorcode.org/license.txt for BSD license.
USING: arrays kernel math.primes.factors
-math.ranges project-euler.common sequences sorting ;
+ranges project-euler.common sequences sorting ;
IN: project-euler.124
! http://projecteuler.net/index.php?section=problems&id=124
! Copyright (c) 2007 Samuel Tardieu.
! See http://factorcode.org/license.txt for BSD license.
USING: arrays kernel lists lists.lazy math.algebra math math.functions
- math.order math.primes.lists math.ranges project-euler.common sequences ;
+ math.order math.primes.lists ranges project-euler.common sequences ;
IN: project-euler.134
! http://projecteuler.net/index.php?section=problems&id=134
! Copyright (c) 2008 Eric Mertens.
! See http://factorcode.org/license.txt for BSD license.
-USING: kernel locals math math.order math.ranges math.statistics
+USING: kernel locals math math.order ranges math.statistics
project-euler.common sequences sequences.private ;
IN: project-euler.150
! Copyright (c) 2008 Eric Mertens.
! See http://factorcode.org/license.txt for BSD license.
-USING: arrays assocs kernel math math.ranges sequences project-euler.common ;
+USING: arrays assocs kernel math ranges sequences project-euler.common ;
IN: project-euler.164
! http://projecteuler.net/index.php?section=problems&id=164
! Copyright (c) 2007 Samuel Tardieu.
! See http://factorcode.org/license.txt for BSD license.
-USING: kernel math math.functions math.ranges sequences project-euler.common ;
+USING: kernel math math.functions ranges sequences project-euler.common ;
IN: project-euler.173
! http://projecteuler.net/index.php?section=problems&id=173
! Copyright (c) 2007 Samuel Tardieu.
! See http://factorcode.org/license.txt for BSD license.
-USING: combinators kernel math math.parser math.ranges sequences vectors project-euler.common ;
+USING: combinators kernel math math.parser ranges sequences vectors project-euler.common ;
IN: project-euler.175
! http://projecteuler.net/index.php?section=problems&id=175
! Copyright (c) 2008 Eric Mertens.
! See http://factorcode.org/license.txt for BSD license.
-USING: circular disjoint-sets kernel math math.ranges sequences project-euler.common ;
+USING: circular disjoint-sets kernel math ranges sequences project-euler.common ;
IN: project-euler.186
! http://projecteuler.net/index.php?section=problems&id=186
! Copyright (c) 2008 Eric Mertens.
! See http://factorcode.org/license.txt for BSD license.
-USING: kernel sequences math math.functions math.ranges locals project-euler.common ;
+USING: kernel sequences math math.functions ranges locals project-euler.common ;
IN: project-euler.190
! http://projecteuler.net/index.php?section=problems&id=190
! Copyright (c) 2010 Aaron Schaefer. All rights reserved.
! The contents of this file are licensed under the Simplified BSD License
! A copy of the license is available at http://factorcode.org/license.txt
-USING: grouping kernel math math.ranges project-euler.common
+USING: grouping kernel math ranges project-euler.common
sequences sequences.cords assocs ;
IN: project-euler.206
! Copyright (c) 2009 Jon Harper.
! See http://factorcode.org/license.txt for BSD license.
-USING: arrays io kernel locals math math.functions math.parser math.ranges
+USING: arrays io kernel locals math math.functions math.parser ranges
namespaces prettyprint project-euler.common sequences threads ;
IN: project-euler.255
! A copy of the license is available at http://factorcode.org/license.txt
USING: accessors arrays byte-arrays fry hints kernel lists make
math math.functions math.matrices math.order math.parser
-math.primes.factors math.primes.lists math.ranges math.ratios
+math.primes.factors math.primes.lists ranges math.ratios
math.vectors parser prettyprint sequences sorting strings
unicode vocabs.parser words ;
IN: project-euler.common
! Copyright (C) 2019 Jack Lucas
! See http://factorcode.org/license.txt for BSD license.
-USING: raylib kernel math.ranges sequences locals random
+USING: raylib kernel ranges sequences locals random
combinators.random math threads calendar namespaces accessors
classes.struct combinators alien.enums ;
! Copyright (c) 2012 Anonymous
! See http://factorcode.org/license.txt for BSD license.
-USING: bit-arrays formatting fry kernel math math.ranges
+USING: bit-arrays formatting fry kernel math ranges
sequences ;
IN: rosetta-code.100-doors
! Copyright (c) 2012 Anonymous
! See http://factorcode.org/license.txt for BSD license.
USING: accessors arrays kernel locals math math.functions
-math.ranges math.vectors rosetta-code.bitmap sequences
+ranges math.vectors rosetta-code.bitmap sequences
ui.gadgets ;
IN: rosetta-code.bitmap-line
! Copyright (c) 2012 Anonymous
! See http://factorcode.org/license.txt for BSD license.
USING: accessors assocs combinators fry grouping hashtables
-kernel locals math math.parser math.ranges random sequences
+kernel locals math math.parser ranges random sequences
strings io ascii ;
IN: rosetta-code.bulls-and-cows
! Copyright (c) 2012 Anonymous
! See http://factorcode.org/license.txt for BSD license.
USING: arrays combinators io kernel locals math math.functions
-math.ranges prettyprint sequences ;
+ranges prettyprint sequences ;
IN: rosetta-code.continued-fraction
! http://rosettacode.org/wiki/Continued_fraction
! Copyright (c) 2012 Anonymous
! See http://factorcode.org/license.txt for BSD license.
-USING: arrays locals math math.ranges sequences sets sorting ;
+USING: arrays locals math ranges sequences sets sorting ;
IN: rosetta-code.count-the-coins
! http://rosettacode.org/wiki/Count_the_coins
! Copyright (C) 2015 Alexander Ilin, Doug Coleman, John Benediktsson.
! See http://factorcode.org/license.txt for BSD license.
-USING: assocs fry kernel locals math math.ranges math.statistics
+USING: assocs fry kernel locals math ranges math.statistics
math.vectors prettyprint random sequences sorting ;
IN: rosetta-code.dice7
! Copyright (c) 2012 Anonymous
! See http://factorcode.org/license.txt for BSD license.
-USING: io kernel math math.functions math.parser math.ranges
+USING: io kernel math math.functions math.parser ranges
sequences ;
IN: rosetta-code.fizzbuzz
! Copyright (c) 2012 Anonymous
! See http://factorcode.org/license.txt for BSD license.
-USING: arrays kernel locals math math.parser math.ranges
+USING: arrays kernel locals math math.parser ranges
prettyprint sequences ;
IN: rosetta-code.gray-code
! Copyright (c) 2012 Anonymous
! See http://factorcode.org/license.txt for BSD license.
-USING: arrays io kernel math math.ranges prettyprint sequences vectors ;
+USING: arrays io kernel math ranges prettyprint sequences vectors ;
IN: rosetta-code.hailstone-sequence
! http://rosettacode.org/wiki/Hailstone_sequence
-USING: kernel locals math math.ranges sequences ;
+USING: kernel locals math ranges sequences ;
IN: rosetta-code.josephus-problem
! http://rosettacode.org/wiki/Josephus_problem
! Copyright (c) 2012 Anonymous
! See http://factorcode.org/license.txt for BSD license.
USING: accessors arrays fry io kernel locals make math
-math.order math.parser math.ranges sequences sorting ;
+math.order math.parser ranges sequences sorting ;
IN: rosetta-code.knapsack
! http://rosettacode.org/wiki/Knapsack_problem/0-1
! Copyright (c) 2012 Anonymous
! See http://factorcode.org/license.txt for BSD license.
-USING: kernel math math.parser math.order math.ranges sequences ;
+USING: kernel math math.parser math.order ranges sequences ;
IN: rosetta-code.luhn-test
! http://rosettacode.org/wiki/Luhn_test_of_credit_card_numbers
! Copyright (c) 2012 Anonymous
! See http://factorcode.org/license.txt for BSD license.
-USING: io kernel math math.parser math.ranges sequences ;
+USING: io kernel math math.parser ranges sequences ;
IN: rosetta-code.multiplication-tables
! http://rosettacode.org/wiki/Multiplication_tables
! Copyright (c) 2012 Anonymous
! See http://factorcode.org/license.txt for BSD license.
-USING: formatting io kernel math math.parser math.ranges
+USING: formatting io kernel math math.parser ranges
namespaces random sequences strings ;
IN: rosetta-code.number-reversal
! Copyright (c) 2012 Anonymous
! See http://factorcode.org/license.txt for BSD license.
-USING: grouping kernel locals math math.ranges sequences ;
+USING: grouping kernel locals math ranges sequences ;
IN: rosetta-code.pascals-triangle
! http://rosettacode.org/wiki/Pascal%27s_triangle
! Copyright (c) 2012 Anonymous
! See http://factorcode.org/license.txt for BSD license.
USING: accessors arrays formatting kernel literals math
-math.functions math.matrices math.ranges sequences ;
+math.functions math.matrices ranges sequences ;
IN: rosetta-code.pythagorean-triples
! http://rosettacode.org/wiki/Pythagorean_triples
! Copyright (C) 2009 Maximilian Lupke.
! See http://factorcode.org/license.txt for BSD license.
-USING: assocs kernel math.ranges sequences ;
+USING: assocs kernel ranges sequences ;
IN: sequences.abbrev
<PRIVATE
{ "quot" { $quotation ( ... elt -- ... ? ) } }
{ "%" rational } }
{ $description "Outputs the fraction of elements in the sequence for which the predicate quotation matches." }
-{ $examples { $example "USING: math math.ranges prettyprint sequences.extras ;" "100 [1,b] [ even? ] count* ." "1/2" } } ;
+{ $examples { $example "USING: math ranges prettyprint sequences.extras ;" "100 [1,b] [ even? ] count* ." "1/2" } } ;
HELP: collapse
{ $values
USING: accessors arrays assocs combinators fry generalizations
-grouping growable kernel locals make math math.order math.ranges
+grouping growable kernel locals make math math.order ranges
sequences sequences.deep sequences.private shuffle sorting
splitting vectors ;
IN: sequences.extras
! (c)2008 Joe Groff, see BSD license etc.
-USING: accessors assocs kernel math math.ranges sequences
+USING: accessors assocs kernel math ranges sequences
sequences.private ;
IN: sequences.n-based
! Copyright (C) 2007, 2010 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors arrays colors fonts fry help.markup help.stylesheet
-io.styles kernel literals math math.ranges models namespaces parser
+io.styles kernel literals math ranges models namespaces parser
sequences system ui ui.gadgets ui.gadgets.books ui.gadgets.panes
ui.gestures ui.pens.gradient ui.pens.solid ;
IN: slides
! Copyright (C) 2009 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
-USING: kernel present io math sequences assocs math.ranges
+USING: kernel present io math sequences assocs ranges
math.order fry tools.time locals smalltalk.selectors
smalltalk.ast smalltalk.classes ;
IN: smalltalk.library
! Copyright (C) 2014 John Benediktsson
! See http://factorcode.org/license.txt for BSD license
-USING: kernel locals math math.order math.ranges sequences
+USING: kernel locals math math.order ranges sequences
sequences.private ;
IN: sorting.bubble
! See http://factorcode.org/license.txt for BSD license
USING: arrays ascii assocs combinators combinators.smart fry
http.client io.encodings.ascii io.files io.files.temp kernel
-locals math math.ranges math.statistics memoize sequences
+locals math ranges math.statistics memoize sequences
sequences.private sorting splitting urls ;
IN: spelling
! Copyright (C) 2008 Alex Chapman
! See http://factorcode.org/license.txt for BSD license.
USING: accessors alien combinators kernel locals math
-math.ranges openal sequences sequences.merged specialized-arrays ;
+ranges openal sequences sequences.merged specialized-arrays ;
FROM: alien.c-types => short uchar ;
SPECIALIZED-ARRAY: uchar
SPECIALIZED-ARRAY: short
! Code based on https://towardsdatascience.com/linear-regression-from-scratch-with-numpy-implementation-finally-8e617d8e274c
USING: arrays accessors csv io io.encodings.utf8 kernel locals math math.parser
-math.ranges math.statistics prettyprint sequences tensors ;
+ranges math.statistics prettyprint sequences tensors ;
IN: tensors.demos
<PRIVATE
! See http://factorcode.org/license.txt for BSD license.
USING: accessors alien alien.c-types alien.data arrays byte-arrays combinators
-grouping kernel locals kernel.private math math.functions math.ranges math.vectors
+grouping kernel locals kernel.private math math.functions ranges math.vectors
math.vectors.simd multi-methods parser prettyprint.custom sequences sequences.extras
sequences.private specialized-arrays typed ;
! See http://factorcode.org/license.txt for BSD license
USING: assocs calendar combinators environment formatting
-grouping io io.files kernel make math math.ranges sequences
+grouping io io.files kernel make math ranges sequences
splitting xml.entities ;
IN: text-to-pdf
(! See http://factorcode.org/license.txt for BSD license)'
( )'
(USING: assocs calendar combinators environment formatting)'
-(grouping io io.files kernel make math math.ranges sequences)'
+(grouping io io.files kernel make math ranges sequences)'
(splitting xml.entities ;)'
( )'
(IN: text-to-pdf)'
! See http://factorcode.org/license.txt for BSD license
USING: combinators command-line io kernel math.order math.parser
-math.ranges namespaces sequences ;
+ranges namespaces sequences ;
IN: tools.seq
USING: accessors arrays assocs combinators fry kernel locals
-math math.combinatorics math.ranges namespaces random sequences
+math math.combinatorics ranges namespaces random sequences
sequences.product tools.test trees trees.private ;
IN: trees.tests
! See http://factorcode.org/license.txt for BSD license.
USING: accessors continuations db.tuples db.types fry furnace.actions
furnace.boilerplate furnace.redirection furnace.utilities html.forms
-http.server.dispatchers kernel math math.ranges random random.data
+http.server.dispatchers kernel math ranges random random.data
sequences urls validators ;
IN: webapps.wee-url
[ print ] each
----
USING: combinators io kernel locals
-math.functions math.parser math.ranges
+math.functions math.parser ranges
sequences ;
100 [1,b] [| i |
! Copyright (C) 2010 Dmitry Shubin.
! See http://factorcode.org/license.txt for BSD license.
-USING: arrays kernel locals math math.ranges sequences
+USING: arrays kernel locals math ranges sequences
sequences.private ;
IN: z-algorithm