Changeset 38204 in project


Ignore:
Timestamp:
02/27/20 15:54:13 (6 weeks ago)
Author:
juergen
Message:

bindings 3.1 docu

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/5/bindings

    r38194 r38204  
    171171named version of bind (body can't be null?).
    172172loop is bound to a procedure, which can be used in the body xpr ....
     173Deprecated, use bind-loop instead.
     174
     175==== bind-loop
     176
     177<macro>(bind-loop pat seq xpr ....)</macro>
     178
     179anaphoric version of bind. Introduces the unrenamed symbol loop
     180behind the scene, to be used in the body xpr ....
    173181
    174182==== bindrec
     
    335343; -> '(1 20 #(30 40) (2 3) 4 #(5 6))
    336344
     345(bind-loop (x (a . b) y) '(5 #(1) 0)
     346  (>> x integer?)
     347  (if (zero? x)
     348    (list x a b y)
     349    (loop (list (- x 1) (cons a (cons a b)) (+ y 1)))))
     350; -> '(0 1 (1 1 1 1 1 . #()) 5)
     351
    337352(bind* loop (x (a . b) y) '(5 #(1) 0)
    338353  (>> x integer?)
     
    341356    (loop (list (- x 1) (cons a (cons a b)) (+ y 1)))))
    342357; -> '(0 1 (1 1 1 1 1 . #()) 5)
     358
     359(bind-loop (x y) '(5 0)
     360  (if (zero? x)
     361    (vector x y)
     362    (loop (vector (- x 1) (+ y 1)))))
     363; -> #(0 5)
    343364
    344365(bind* loop (x y) '(5 0)
     
    479500== Last update
    480501
    481 Feb 23, 2020
     502Feb 27, 2020
    482503
    483504== Author
     
    517538
    518539== Version History
     540; 3.1 : bind* now deprecated, use bind-loop instead.
    519541; 3.0.1 : bugs in bind and bind-listify* fixed
    520542; 3.0 : bind and relatives in two versions, with and without body, bind-listify* replaces bind-seq->list, bind! replaces bind-set! and bind-define
Note: See TracChangeset for help on using the changeset viewer.