repo.or.cz
/
factor
/
jcg.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
remove math.blas.syntax and merge parsing words into math.blas.vectors/matrices
[factor/jcg.git]
/
extra
/
partial-continuations
/
partial-continuations-tests.factor
blob
7e876b0934949f17042d848536f7a0cb4a5bc5cd
1
USING: namespaces math partial-continuations tools.test
2
kernel sequences ;
3
IN: partial-continuations.tests
4
5
SYMBOL: sum
6
7
: range ( r from to -- n )
8
over - 1 + rot [
9
-rot [ over + pick call drop ] each 2drop f
10
] bshift 2nip ;
11
12
[ 55 ] [
13
0 sum set
14
[ 1 10 range sum get + sum set f ] breset drop
15
sum get
16
] unit-test