Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Monadic cond in LISP

Name: Anonymous 2011-02-08 17:34

I'll now post code written with some obscure macros whose implementation will never be released.


(define-macro mcond
  #:keyword (else =>)
  (macro-case
   (() #f)
   (((t) (e . r) ...) (>> failure-m t (mcond (e . r) ...)))
   (((else . t)) (begin . t))
   (((p => f) (e . r) ...) (>> failure-m (>>= maybe-m p f) (mcond (e . r) ...)))
   (((p . t) (e . r) ...) (>> failure-m (>> maybe-m p (begin . t)) (~ (e . r) ...)))))

Name: Anonymous 2011-02-09 16:45

>>2
He's probably that ``in LISP'' bastard. I would never post partial code snippets without providing a full implementation as posting such code is meaningless - code must be both for humans to read and computers to interpret, if one of those cannot be done, the code is more or less meaningless.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List