    "nil" "lists" "nil" define-primitive
    "nil?" "lists" "nil?" define-primitive
 
-   "define" "lisp" "defun" define-primitive
-
-   "(lambda (&rest xs) xs)" lisp-string>factor "list" lisp-define
+   "set" "lisp" "define-lisp-var" define-primitive
+    
+   "(lambda (&rest xs) xs)" lisp-string>factor first "list" lisp-define
+   "(defmacro setq (var val) (list (quote set) (list (quote quote) var) val))" lisp-eval
+    
+   <" (defmacro defun (name vars &rest body)
+        (list (quote setq) name (list (quote lambda) vars body))) "> lisp-eval
+    
    "(defmacro if (pred tr fl) (list (quote cond) (list pred tr) (list (quote #t) fl)))" lisp-eval
    ;
+
+: <LISP 
+    "LISP>" parse-multiline-string define-lisp-builtins
+    lisp-string>factor parsed \ call parsed ; parsing
USING: kernel peg sequences arrays strings combinators.lib
namespaces combinators math locals locals.private locals.backend accessors
vectors syntax lisp.parser assocs parser sequences.lib words
quotations fry lists summary combinators.short-circuit continuations ;
IN: lisp

DEFER: convert-form

    dup lisp-symbol? [ name>> lisp-env get key? ] [ drop f ] if ;

: funcall ( quot sym -- * )
    [ 1array [ call ] with-datastack >quotation ] dip curry call ; inline

: define-primitive ( name vocab word -- )
    swap lookup 1quotation '[ , compose call ] swap lisp-define ;
