Changeset 35203 in project


Ignore:
Timestamp:
02/25/18 05:35:34 (7 months ago)
Author:
kon
Message:

rel 2.2.0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/4/dsssl-utils

    r28426 r35203  
    1919==== Usage
    2020
    21 <enscript language=scheme> (require-extension dsssl-utils) </enscript>
     21<enscript language=scheme>
     22(require-extension dsssl-utils)
     23</enscript>
    2224
    2325==== dsssl-fixup
     
    4143==== fixup-dsssl-lambda-list
    4244
    43 <procedure>(fixup-dsssl-lambda-list OPTIONALS KEYS REST) => values</procedure>
     45<procedure>(fixup-dsssl-lambda-list OPTIONALS KEYS REST) -> list list list</procedure>
    4446
    4547Returns 3 "correct" values: the rest {{list}}, optionals {{list}}, and keys
    4648{{list}}.
    4749
    48 {{OPTIONALS}} is {{((OPTIONAL-VALUE OPTIONAL-DEFAULT)...)}}.
     50: {{OPTIONALS}} ; {{((OPTIONAL-VALUE OPTIONAL-DEFAULT) ...)}}.
     51: {{KEYS}} ; {{((KEYWORD KEYWORD-VALUE) ...)}}.
     52: {{REST}} ; {{(...)}}
    4953
    50 {{KEYS}} is {{((KEYWORD KEYWORD-VALUE)...)}}.
     54==== delete-keyword-arguments
    5155
     56<procedure>(delete-keyword-arguments KEYS REST) --> list</procedure>
     57
     58Returns the "correct" rest {{list}}.
     59
     60: {{KEYS}} ; {{((KEYWORD KEYWORD-VALUE)...)}}.
     61: {{REST}} ; {{(...)}}
    5262
    5363=== DSSSL Extended Lambda List Replacements
     
    6070==== Usage
    6171
    62 <enscript language=scheme> (require-extension lambda+) </enscript>
     72<enscript language=scheme>
     73(require-extension lambda+)
     74</enscript>
    6375
    6476==== define+
     
    8092Replacement for {{lambda}} that that binds formals in the ''correct'' order.
    8193
     94=== Typed Define
     95
     96==== Usage
     97
     98<enscript language=scheme>
     99(require-extension typed-define)
     100</enscript>
     101
     102==== define:
     103
     104<macro>(define: (NAME [(ARGUMENT VALUETYPE) ... [. (REST VALUETYPE)]]) [->|--> RESULTTYPE] BODY...)</macro>
     105
     106{{(: NAME (VALUETYPE ... [#!rest VALUETYPE] [->|--> RESULTTYPE]))}}
     107
     108{{(define (NAME [ARGUMENT ... [. REST]]) BODY...)}}
     109
     110'''No''' runtime type checking is performed.
     111
     112==== define:-record-type
     113
     114<macro>(define:-record-type TAG (CTOR [FLD-NAME ...]) PRED-NAME [((FLD-NAME FLD-TYPE FLD-REF [FLD-SET!]) ...)])</macro>
     115
     116Defines types for the {{TAG}}, {{CTOR}}, {{FLD-REF}}, & any {{FLD-SET!}}
     117
     118'''No''' runtime type checking is performed.
    82119
    83120== Examples
     
    88125(define (f a1 a2 #!optional (o1 'x) o2 #!rest rest #!key k1 k2)
    89126  (print `((a1 ,a1 a2 ,a2) (o1 ,o1 o2 ,o2) (#:k1 ,k1 #:k2 ,k2) (rest ,rest)))
    90   (dsssl-fixup ((o1 'x) o2)
    91                ((#:k1 k1) (#:k2 k2))
    92                rest
     127  (dsssl-fixup ((o1 'x) o2) ((#:k1 k1) (#:k2 k2)) rest
    93128    `((a1 ,a1 a2 ,a2) (o1 ,o1 o2 ,o2) (#:k1 ,k1 #:k2 ,k2) (rest ,rest)) ) )
    94129
     
    121156== Version history
    122157
     158; 2.2.0 : Deprecate {{scrub-dsssl-keys}}. Add {{delete-keyword-arguments}}, {{define:}}, {{define:-record-type}}.
     159; 2.1.0 : Add {{define:}} & {{define:-record-type}}.
    123160; 2.0.1 : Fix for ticket #630
    124161; 2.0.0 :
     
    129166== License
    130167
    131 Copyright (C) 2010 Kon Lovett.  All rights reserved.
     168Copyright (C) 2010-2018 Kon Lovett.  All rights reserved.
    132169
    133170Permission is hereby granted, free of charge, to any person obtaining a copy of
Note: See TracChangeset for help on using the changeset viewer.