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 17:47

>>29
Okey. I'll start by posting this for-loop source

// for {i:0 i<6 !i+1} say i
m:for ['blk v c i] @body ->
  do $@v (cl progn (while (and $@(map ['`!` ?] c))
                     !$body $@(map ['`!` ?] i)))

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