Locals doesn't need to use map-call-with2

db4
Slava Pestov 2008-03-13 03:49:07 -05:00
parent 85cfca5468
commit 5e6a1bd241
1 changed files with 3 additions and 3 deletions
extra/locals

View File

@ -5,7 +5,7 @@ inference.transforms parser words quotations debugger macros
arrays macros splitting combinators prettyprint.backend
definitions prettyprint hashtables combinators.lib
prettyprint.sections sequences.private effects generic
compiler.units ;
compiler.units combinators.cleave ;
IN: locals
! Inspired by
@ -108,8 +108,8 @@ UNION: special local quote local-word local-reader local-writer ;
if ;
: (point-free) ( quot args -- newquot )
{ [ load-locals ] [ point-free-body ] [ point-free-end ] }
map-call-with2 concat >quotation ;
[ load-locals ] [ point-free-body ] [ point-free-end ]
2tri 3append >quotation ;
: point-free ( quot args -- newquot )
over empty? [ drop ] [ (point-free) ] if ;