 
 DEFER: convert-form
 DEFER: funcall
+DEFER: lookup-vars
 
 ! Functions to convert s-exps to quotations
 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

  rest [ [ convert-form map ] map ] [ % cond ] bake ;
  
: convert-general-form ( s-exp -- quot )
  unclip convert-form swap convert-body [ , % funcall ] bake ;

! words for convert-lambda  
<PRIVATE  

: funcall ( quot sym -- * )
  dup lisp-symbol?  [ name>> lisp-get ] when call ; inline

: lookup-vars ( q -- p )  
  [ dup lisp-symbol? [ name>> lisp-get ] when ] map ;
  
: define-primitve ( name vocab word -- )  
  swap lookup [ [ , ] compose call ] bake lisp-define ;