Changeset 34422 in project


Ignore:
Timestamp:
08/27/17 05:58:41 (3 months ago)
Author:
kon
Message:

comments

Location:
release/4/amb/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • release/4/amb/trunk/amb-extras.scm

    r34337 r34422  
    4141(define-syntax amb1
    4242  (syntax-rules ()
     43    ;
    4344    ((_)
    4445     ((amb-failure-continuation)) )
     46    ;
    4547    ((_ ?ls)
    4648     (amb-thunks (list-constantly ?ls)) ) ) )
     
    4850(define-syntax choose
    4951  (syntax-rules ()
     52    ;
    5053    ((_)
    5154     ((amb-failure-continuation)) )
     55    ;
    5256    ((_ ?ls)
    5357      (amb-thunks-shuffled (list-constantly ?ls) (amb-random-function)) ) ) )
  • release/4/amb/trunk/amb.scm

    r34337 r34422  
    7575(define-syntax amb
    7676  (syntax-rules ()
     77    ;
    7778    ((_)
    7879     ((amb-failure-continuation)) )
     80    ;
    7981    ((_ ?expr0 ...)
    8082     (amb-thunks (list (lambda () ?expr0) ...)) ) ) )
     
    8284(define-syntax amb/random
    8385  (syntax-rules ()
     86    ;
    8487    ((_)
    8588     ((amb-failure-continuation)) )
     89    ;
    8690    ((_ ?expr0 ...)
    8791     (amb-thunks-shuffled (list (lambda () ?expr0) ...)) ) ) )
     
    8993(define-syntax amb-find
    9094  (syntax-rules ()
     95    ;
    9196    ((_ ?expr)
    9297     (amb-find-thunk (lambda () ?expr)) )
     98    ;
    9399    ((_ ?expr ?fail)
    94100     (amb-find-thunk (lambda () ?expr) (lambda () ?fail)) ) ) )
Note: See TracChangeset for help on using the changeset viewer.