new accessors
parent
7652c3ec95
commit
e81d69ab34
|
@ -48,7 +48,7 @@ IN: heaps.tests
|
||||||
: test-entry-indices ( n -- ? )
|
: test-entry-indices ( n -- ? )
|
||||||
random-alist
|
random-alist
|
||||||
<min-heap> [ heap-push-all ] keep
|
<min-heap> [ heap-push-all ] keep
|
||||||
data>> dup length swap [ entry-index ] map sequence= ;
|
data>> dup length swap [ index>> ] map sequence= ;
|
||||||
|
|
||||||
14 [
|
14 [
|
||||||
[ t ] swap [ 2^ test-entry-indices ] curry unit-test
|
[ t ] swap [ 2^ test-entry-indices ] curry unit-test
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: threads kernel prettyprint prettyprint.config
|
USING: threads kernel prettyprint prettyprint.config
|
||||||
io io.styles sequences assocs namespaces sorting boxes
|
io io.styles sequences assocs namespaces sorting boxes
|
||||||
heaps.private system math math.parser math.order ;
|
heaps.private system math math.parser math.order accessors ;
|
||||||
IN: tools.threads
|
IN: tools.threads
|
||||||
|
|
||||||
: thread. ( thread -- )
|
: thread. ( thread -- )
|
||||||
|
@ -14,7 +14,7 @@ IN: tools.threads
|
||||||
] with-cell
|
] with-cell
|
||||||
[
|
[
|
||||||
thread-sleep-entry [
|
thread-sleep-entry [
|
||||||
entry-key millis [-] number>string write
|
key>> millis [-] number>string write
|
||||||
" ms" write
|
" ms" write
|
||||||
] when*
|
] when*
|
||||||
] with-cell ;
|
] with-cell ;
|
||||||
|
|
Loading…
Reference in New Issue