Removing special case for 'begin' in lisp - will implement as a macro
parent
6543c03b0f
commit
b4ee671500
|
@ -19,9 +19,6 @@ DEFER: define-lisp-macro
|
||||||
: convert-body ( cons -- quot )
|
: convert-body ( cons -- quot )
|
||||||
[ ] [ convert-form compose ] foldl ; inline
|
[ ] [ convert-form compose ] foldl ; inline
|
||||||
|
|
||||||
: convert-begin ( cons -- quot )
|
|
||||||
cdr [ convert-form ] [ ] lmap-as '[ , [ call ] each ] ;
|
|
||||||
|
|
||||||
: convert-cond ( cons -- quot )
|
: convert-cond ( cons -- quot )
|
||||||
cdr [ 2car [ convert-form ] bi@ 2array ]
|
cdr [ 2car [ convert-form ] bi@ 2array ]
|
||||||
{ } lmap-as '[ , cond ] ;
|
{ } lmap-as '[ , cond ] ;
|
||||||
|
@ -71,7 +68,6 @@ PRIVATE>
|
||||||
{ { "lambda" [ convert-lambda ] }
|
{ { "lambda" [ convert-lambda ] }
|
||||||
{ "defmacro" [ convert-defmacro ] }
|
{ "defmacro" [ convert-defmacro ] }
|
||||||
{ "quote" [ convert-quoted ] }
|
{ "quote" [ convert-quoted ] }
|
||||||
{ "begin" [ convert-begin ] }
|
|
||||||
{ "cond" [ convert-cond ] }
|
{ "cond" [ convert-cond ] }
|
||||||
[ drop convert-general-form ]
|
[ drop convert-general-form ]
|
||||||
} case ;
|
} case ;
|
||||||
|
|
Loading…
Reference in New Issue