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:52

>>36

e:`^` base power -> cl expt base power
e:exp x -> cl exp x
e:sqrt x -> cl sqrt x
e:log base x -> cl log x base
e:sin x -> cl sin x
e:cos x -> cl cos x
e:tan x -> cl tan x
e:asin x -> cl asin x
e:acos x -> cl acos x
e:atan x -> cl atan x

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