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 13:10

>>13
You're an idiot. DEFINE-SYNTAX is basically DEFMACRO with the provision that you can get and insert contexts into identifiers so that hygiene can be preserved, which you would know if you had ever used it. Like DEFMACRO it binds an arbitrary syntax transformer, and there is no requirement that you use either SYNTAX-RULES or SYNTAX-CASE.

some BNF-parser crap
It's just a pattern matcher, like I said, you don't have to use it.
not defmacro
(define-syntax define-macro
  (lambda (incoming)
    (syntax-case incoming ()
      ((_ (?name ?arg ...) ?form ...)
       (syntax
        (define-macro ?name (lambda (?arg ...) ?form ...))))
      ((_ ?name ?func)
       (syntax
        (define-syntax ?name
          (lambda (x)
            (syntax-case x ()
              ((kwd . rest)
               (datum->syntax #'kwd (apply ?func (cdr (syntax->datum
x)))))))))))))


When it comes down to it, you have decided before the fact that anything that does not come prepackaged as DEFMACRO isn't a macro, which is a stupid and arbitrary definition, and one that does not reflect well upon you. At least the other CL user who argued this point made an effort.

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