Paste: goto

Author: glguy
Mode: factor
Date: Wed, 8 Apr 2009 18:13:32
Plain Text |
IN: getcc

USING: continuations kernel arrays sequences ;

: label-with ( obj -- obj label )
    [ swap 2array ] curry callcc1 first2 ;

: goto-with ( obj label -- * )
    [ 2array ] keep continue-with ;

: label ( -- label )
    [ ] callcc1 ;

: goto ( label -- * )
    dup continue-with ;

New Annotation

Summary:
Author:
Mode:
Body: