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

Common Lisp

Name: Anonymous 2011-03-02 8:20

* (nth 1 '(1 2 3 4))

2
* (elt "1234" 1)

#\2


Explain this bullshit. argument order

Name: Anonymous 2011-03-02 14:01

>>15
It can be shorter. And better.

(define-syntax (define-macro stx)
  (syntax-case stx ()
    ((~ (n . a) . f) #'(~ n (lambda a . f)))
    ((~ n f)
     #'(define-syntax (n stx)
         (syntax-case stx ()
           ((k . r) #`#,(apply f (syntax->datum #'r))))))))


Now it accepts ``rest'' args and has less parentheses for the joy of faggots like >>16 or >>16.

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