math.extras: adding dotted range syntax.

db4
John Benediktsson 2014-06-10 18:17:27 -07:00
parent 219c73b0c1
commit acc06aeeee
1 changed files with 6 additions and 2 deletions

View File

@ -5,8 +5,8 @@ USING: accessors arrays assocs assocs.extras byte-arrays
combinators combinators.short-circuit compression.zlib fry combinators combinators.short-circuit compression.zlib fry
grouping kernel locals math math.combinatorics math.constants grouping kernel locals math math.combinatorics math.constants
math.functions math.order math.primes math.ranges math.functions math.order math.primes math.ranges
math.ranges.private math.statistics math.vectors memoize random math.ranges.private math.statistics math.vectors memoize parser
sequences sequences.extras sequences.private sets sorting random sequences sequences.extras sequences.private sets sorting
sorting.extras ; sorting.extras ;
IN: math.extras IN: math.extras
@ -303,3 +303,7 @@ PRIVATE>
: map-kahan-sum ( ... seq quot: ( ... elt -- ... n ) -- ... n ) : map-kahan-sum ( ... seq quot: ( ... elt -- ... n ) -- ... n )
[ 0.0 0.0 ] 2dip [ 2dip rot kahan+ ] curry [ 0.0 0.0 ] 2dip [ 2dip rot kahan+ ] curry
[ -rot ] prepose each nip ; inline [ -rot ] prepose each nip ; inline
SYNTAX: .. dup pop scan-object [a,b) suffix! ;
SYNTAX: ... dup pop scan-object [a,b] suffix! ;