Fixing 'begin'

db4
James Cash 2008-05-19 17:09:43 -04:00
parent b2cbe83be8
commit 12d0367d73
1 changed files with 2 additions and 2 deletions

View File

@ -2,7 +2,7 @@
! See http://factorcode.org/license.txt for BSD license.
USING: kernel peg sequences arrays strings combinators.lib
namespaces combinators math bake locals locals.private accessors
vectors syntax lisp.parser assocs parser sequences.lib words ;
vectors syntax lisp.parser assocs parser sequences.lib words quotations ;
IN: lisp
DEFER: convert-form
@ -18,7 +18,7 @@ DEFER: lookup-var
rest [ convert-form ] map reverse first3 [ % , , if ] bake ;
: convert-begin ( s-exp -- quot )
rest convert-form ;
rest [ convert-form ] map >quotation [ , [ funcall ] each ] bake ;
: convert-cond ( s-exp -- quot )
rest [ body>> >array [ convert-form ] map first2 swap `{ [ % funcall ] , } bake ]