   (jl-destructure [self arg] {name arg}))
 
 (defrecord constant [object]
-  JLObject
+  JLConstant
   (constant? [self] true)
   Evaluable
   (jl-eval [self env] object)

  (jl-eval [self env]))

(defrecord variable [name]
  JLObject
  (variable? [self] true)
  Evaluable
  (jl-eval [self env] (lookup env name))


;;;; Evaluator

(defprotocol JLVariable
  (variable? [self]))

(defprotocol JLConstant
  (constant? [self]))

(defprotocol JLPrimitive
  (primitive? [self]))

(defprotocol JLClosure
  (closure? [self]))

(defprotocol JLLambdaExp
  (lambda-exp? [self]))

(defprotocol JLApplication
  (application? [self]))

(defprotocol JLPair
  (pair? [self]))

(defprotocol JLEmptyList
 (empty-list? [self]))

(extend-type Object
  JLVariable
  (variable? [self] false)
  JLConstant
  (constant? [self] false)
  JLPrimitive
  (primitive? [self] false)
  JLClosure
  (closure? [self] false)
  JLLambdaExp
  (lambda-exp? [self] false)
  JLApplication
  (application? [self] false)
  JLPair
  (pair? [self] false)
  JLEmptyList
  (empty-list? [self] false))

(declare jl-eval)
