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 22:00

>>15
>insert contexts into identifiers so that hygiene can be preserved,
Hygiene is an autistic crap. Normal people dont need it.

>It's just a pattern matcher, like I said, you don't have to use it.
Pattern matcher IS a PARSER. I dont see much difference between REGEXPs and YACCs. Both have some overly-compilcated declarative semantics, like haskell, that never works as I want it to work.

>(define-syntax define-macro
it doesnt work

$ mzscheme
Welcome to MzScheme v372 [3m], Copyright (c) 2004-2007 PLT Scheme Inc.
(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)))))))))))))
(define-macro aif (cond then else)
  `(let ((it ,cond))
     (if it ,then ,else)))
stdin::423: define-macro: bad syntax in: (define-macro aif (cond then else) (quasiquote (let ((it (unquote cond))) (if it (unquote then) (unquote else)))))

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