Hi all,

Here is an example usage of the new 'fry' abstraction:

: with-exit-continuation ( quot -- )
    '[ exit-continuation set @ ] callcc1 exit-continuation off ;

This is equivalent to any one of the following:

: with-exit-continuation ( quot -- )
    [ exit-continuation set call ] callcc1 nip exit-continuation off ;

: with-exit-continuation ( quot -- )
    [ swap exit-continuation set call ] curry callcc1 exit-continuation 
off ;

: with-exit-continuation ( quot -- )
    [ exit-continuation set ] swap compose callcc1 exit-continuation off ;

Slava

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to