2014-06-27 22:32:23 -04:00
|
|
|
(define-library (picrin control list)
|
|
|
|
(import (scheme base)
|
2014-07-17 03:17:47 -04:00
|
|
|
(picrin control))
|
2014-06-27 22:32:23 -04:00
|
|
|
|
|
|
|
(define-syntax for
|
|
|
|
(syntax-rules ()
|
2015-07-18 02:39:34 -04:00
|
|
|
((_ expr ...)
|
|
|
|
(reset expr ...))))
|
2014-06-27 22:32:23 -04:00
|
|
|
|
|
|
|
(define (in m)
|
2015-07-18 02:39:34 -04:00
|
|
|
(shift k (apply append (map k m))))
|
2014-06-27 22:32:23 -04:00
|
|
|
|
|
|
|
(define (yield x)
|
|
|
|
(list x))
|
|
|
|
|
2014-06-27 23:07:56 -04:00
|
|
|
(define (null . x)
|
|
|
|
'())
|
|
|
|
|
|
|
|
(export for in yield null))
|