Changeset 32916 in project


Ignore:
Timestamp:
11/17/15 20:33:29 (5 years ago)
Author:
juergen
Message:

bindings docu

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/4/bindings

    r32913 r32916  
    199199xpr .... in this context, provided all fenders return #t, if supplied.
    200200
     201====  bind-case
     202
     203<macro>(bind-case seq (pat (where fender ...) .. xpr ....) ....)</macro>
     204
     205Matches seq against a series of patterns and executes the body of the
     206first matching pattern satisfying fenders (if given).
     207
     208==== bind-exception
     209
     210<procedure>(bind-exception loc msg . args)</procedure>
     211
     212generates a composite condition of type (exn bind) with location loc,
     213message msg and arguments args.
     214
     215==== bind-exception-handler
     216
     217<procedure>(bind-exception-handler var)</procedure>
     218
     219exception-handler to be passed to the parameter
     220current-exception-handler
     221
     222==== signal-bind-exception
     223
     224<procedure>(signal-bind-exception loc msg arg ...)</procedure>
     225
     226signals a bind-exception, can be used instead of error.
     227
     228==== bind-table-show
     229
     230<procedure>(bind-table-show)</procedure>
     231
     232prints the contents of the table
     233
     234==== bind-table-add!
     235
     236<procedure>(bind-table-add! type? len ref tail)</procedure>
     237
     238adds a custom new list of sequence operators to the top of the table
     239(in previous versions of the library named seq-length-ref-tail!)
     240
     241==== bind-seq-length
     242
     243<procedure>(bind-seq-length seq)</procedure>
     244
     245returns the length of the generic sequence seq
     246(previously named seq-length)
     247
     248==== bind-seq-ref
     249
     250<procedure>(bind-seq-ref seq n)</procedure>
     251
     252returns the nth item of the generic sequence seq
     253(preveiously named seq-ref)
     254
     255==== bind-seq-tail
     256
     257<procedure>(bind-seq-tail seq n)</procedure>
     258
     259returns the tail of the generic sequence seq, starting at n
     260(previously named seq-tail)
     261
     262==== symbol-dispatcher
     263
     264<procedure>(symbol-dispatcher alist)</procedure>
     265
     266creates a documentation procedure as used in all modules
     267of this library.
     268
     269==== list-of
     270
     271<procedure>(list-of ok? ...)</procedure>
     272
     273returns a predicate which checks, if its list argument passes every
     274predicate ok? ...
     275
     276==== vector-of
     277
     278<procedure>(vector-of ok? ...)</procedure>
     279
     280returns a predicate which checks, if its vector argument passes every
     281predicate ok? ...
     282
     283
     284=== The module macro-bindings
     285
     286==== macro-bindings
     287
     288<procedure>(macro-bindings sym ..)</procedure>
     289
     290documentation procedure. Shows the exported symbols and the syntax of
     291such an exported symbol, respectively.
     292
     293==== macro-rules
     294
     295<macro>(macro-rules sym ... (keyword ...) (pat (where fender ...) .. tpl) ....)</macro>
     296
     297like syntax-rules, but the templates are usually quasiquote-expressions.
     298Moreover, the symbols sym ... are injected, if there are any.
     299
     300Note, that non-symbol literals are accepted in  each pat and
     301considered a match if they are equal to a corresponding literal in the
     302macro-code.
     303
     304macro-rules must be imported for-syntax if used in the preprocessing
     305phase of a macro evaluation. The same applies to bind and friends.
     306
     307==== define-macro
     308
     309<macro>(define-macro (name . args) (where fender ...) .. xpr ....))</macro>
     310
     311generates a hygienic implicit-renaming macro, name.
     312
     313==== macro-let
     314
     315<macro>(macro-let (((name . args) (where fender ...) .. xpr ...) ...) body ....)</macro>
     316
     317evaluates body ... in the context of parallel hygienic macros name ....
     318
     319==== macro-letrec
     320
     321<macro>(macro-letrec (((name . args) (where fender ...) .. xpr ...) ...) body ....)</macro>
     322
     323evaluates body ... in the context of recursive hygienic macros name ....
     324
     325==== once-only
     326
     327<macro>(once-only (x ...)  body ....)</macro>
     328
     329to be used in a macro-body to avoid side-effects.
     330The arguments x ... are only evaluated once.
     331once-only must be imported for-syntax.
     332
     333==== with-gensyms
     334
     335<macro>(with-gensyms (x ...) . body)</macro>
     336
     337to be used in a macro body. Generates a list of gensyms x ...
     338with-gensyms must be imported for-syntax.
     339
     340=== The module more-bindings
     341
     342==== more-bindings
     343
     344<procedure>(more-bindings sym ..)</procedure>
     345
     346documentation procedure. Shows the exported symbols and the syntax of
     347such an exported symbol, respectively.
     348
    201349==== bindable?
    202350
     
    207355(the syntax is slightly changed for consistency).
    208356
    209 ====  bind-case
    210 
    211 <macro>(bind-case seq (pat (where fender ...) .. xpr ....) ....)</macro>
    212 
    213 Matches seq against a series of patterns and executes the body of the
    214 first matching pattern satisfying fenders (if given).
    215 
    216357==== bind-define
    217358
     
    225366
    226367sets symbols of pat to corresponding subexpressions of seq
    227 
    228 ==== bind-exception
    229 
    230 <procedure>(bind-exception loc msg . args)</procedure>
    231 
    232 generates a composite condition of type (exn bind) with location loc,
    233 message msg and arguments args.
    234 
    235 ==== bind-exception-handler
    236 
    237 <procedure>(bind-exception-handler var)</procedure>
    238 
    239 exception-handler to be passed to the parameter
    240 current-exception-handler
    241 
    242 ==== signal-bind-exception
    243 
    244 <procedure>(signal-bind-exception loc msg arg ...)</procedure>
    245 
    246 signals a bind-exception, can be used instead of error.
    247 
    248 ==== bind-table-show
    249 
    250 <procedure>(bind-table-show)</procedure>
    251 
    252 prints the contents of the table
    253 
    254 ==== bind-table-add!
    255 
    256 <procedure>(bind-table-add! type? len ref tail)</procedure>
    257 
    258 adds a custom new list of sequence operators to the top of the table
    259 (in previous versions of the library named seq-length-ref-tail!)
    260 
    261 ==== bind-seq-length
    262 
    263 <procedure>(bind-seq-length seq)</procedure>
    264 
    265 returns the length of the generic sequence seq
    266 (previously named seq-length)
    267 
    268 ==== bind-seq-ref
    269 
    270 <procedure>(bind-seq-ref seq n)</procedure>
    271 
    272 returns the nth item of the generic sequence seq
    273 (preveiously named seq-ref)
    274 
    275 ==== bind-seq-tail
    276 
    277 <procedure>(bind-seq-tail seq n)</procedure>
    278 
    279 returns the tail of the generic sequence seq, starting at n
    280 (previously named seq-tail)
    281 
    282 ==== symbol-dispatcher
    283 
    284 <procedure>(symbol-dispatcher alist)</procedure>
    285 
    286 creates a documentation procedure as used in all modules
    287 of this library.
    288 
    289 ==== list-of
    290 
    291 <procedure>(list-of ok? ...)</procedure>
    292 
    293 returns a predicate which checks, if its list argument passes every
    294 predicate ok? ...
    295 
    296 ==== vector-of
    297 
    298 <procedure>(vector-of ok? ...)</procedure>
    299 
    300 returns a predicate which checks, if its vector argument passes every
    301 predicate ok? ...
    302 
    303 
    304 === The module macro-bindings
    305 
    306 ==== macro-bindings
    307 
    308 <procedure>(macro-bindings sym ..)</procedure>
    309 
    310 documentation procedure. Shows the exported symbols and the syntax of
    311 such an exported symbol, respectively.
    312 
    313 ==== macro-rules
    314 
    315 <macro>(macro-rules sym ... (keyword ...) (pat (where fender ...) .. tpl) ....)</macro>
    316 
    317 like syntax-rules, but the templates are usually quasiquote-expressions.
    318 Moreover, the symbols sym ... are injected, if there are any.
    319 
    320 Note, that non-symbol literals are accepted in  each pat and
    321 considered a match if they are equal to a corresponding literal in the
    322 macro-code.
    323 
    324 macro-rules must be imported for-syntax if used in the preprocessing
    325 phase of a macro evaluation. The same applies to bind and friends.
    326 
    327 ==== define-macro
    328 
    329 <macro>(define-macro (name . args) (where fender ...) .. xpr ....))</macro>
    330 
    331 generates a hygienic implicit-renaming macro, name.
    332 
    333 ==== macro-let
    334 
    335 <macro>(macro-let (((name . args) (where fender ...) .. xpr ...) ...) body ....)</macro>
    336 
    337 evaluates body ... in the context of parallel hygienic macros name ....
    338 
    339 ==== macro-letrec
    340 
    341 <macro>(macro-letrec (((name . args) (where fender ...) .. xpr ...) ...) body ....)</macro>
    342 
    343 evaluates body ... in the context of recursive hygienic macros name ....
    344 
    345 ==== once-only
    346 
    347 <macro>(once-only (x ...)  body ....)</macro>
    348 
    349 to be used in a macro-body to avoid side-effects.
    350 The arguments x ... are only evaluated once.
    351 once-only must be imported for-syntax.
    352 
    353 ==== with-gensyms
    354 
    355 <macro>(with-gensyms (x ...) . body)</macro>
    356 
    357 to be used in a macro body. Generates a list of gensyms x ...
    358 with-gensyms must be imported for-syntax.
    359 
    360 === The module more-bindings
    361 
    362 ==== more-bindings
    363 
    364 <procedure>(more-bindings sym ..)</procedure>
    365 
    366 documentation procedure. Shows the exported symbols and the syntax of
    367 such an exported symbol, respectively.
    368368
    369369==== bind-lambda
Note: See TracChangeset for help on using the changeset viewer.