Changeset 40350 in project


Ignore:
Timestamp:
08/20/21 22:53:01 (5 weeks ago)
Author:
Idiomdrottning
Message:

ct, ctq and friends

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/5/brev-separate

    r40184 r40350  
    240240
    241241⇒ (tornado kind-girl ruby)
     242
     243
     244==== ct, ctq, ct*, ctq*
     245This is sugar for creating call-tables with some values already filled.
     246
     247The q variants are implicitly quasiquoted while the non-q variants aren't.
     248
     249I.e.
     250
     251 (let ((banana-color 'yellow))
     252   (ctq banana ,banana-color apple red))
     253
     254is equivalent to
     255
     256 (let ((banana-color 'yellow))
     257   (call-table seed: `((banana . ,banana-color) (apple . red))))
     258
     259and
     260
     261 (let ((banana-color 'yellow))
     262   (ct 'banana banana-color 'apple 'red))
     263
     264The * variants create {{call-table*}} instances instead.
     265
     266These call-tables aren't closed, you can add more keys and values to them.
    242267
    243268
     
    316341
    317342I later found out that {{@>}} from the {{holes}} egg is same the
    318 combinator as this.
     343combinator as this. Then, a few months later than that, I found out
     344that {{partial}} from Clojure is the same combinator as this.
    319345
    320346It has arbitrary arity and can work on arbitrary arity functions, but
Note: See TracChangeset for help on using the changeset viewer.