Paste: it's like a pause button for the VM

Author: _phred
Mode: factor
Date: Sun, 22 May 2011 22:24:04
Plain Text |
( scratchpad ) fred@zoom ~/factor> ./factor 
Loading /Users/fred/.factor-rc
( scratchpad ) USE: facsimile
( scratchpad ) test-iteration
0
1
2
3
4
fred@zoom ~/factor> ./factor 
Loading /Users/fred/.factor-rc
( scratchpad ) USE: facsimile
( scratchpad ) resume
5
6
7
8
9
( scratchpad ) f

Annotation: more detail

Author: _phred
Mode: factor
Date: Sun, 22 May 2011 22:27:32
Plain Text |
( scratchpad ) fred@zoom ~/factor> ./factor 
Loading /Users/fred/.factor-rc
( scratchpad ) USE: facsimile
( scratchpad ) \ test-iteration see
USING: continuations io kernel prettyprint sequences ;
IN: facsimile
: test-iteration ( -- )
    10 iota
    [ dup 5 = [ [ save-and-exit ] callcc0 ] when . flush ] each
    ;

#! this is on github: https://github.com/phred/facsimile

New Annotation

Summary:
Author:
Mode:
Body: