I want to create scheme like define macro, here is my try:
(defmacro define [list & body]
`(defn ,(first list) [~@(rest list)] ~body))
but when I run:
(define (foo a b) (+ a b))
I've got error: java.lang.Exception: First argument to def must be a Symbol (NO_SOURCE_FILE:18)
what's wrong with my macro?