Add MEMO::
parent
7d16edcc79
commit
6980050a83
|
@ -5,7 +5,7 @@ inference.transforms parser words quotations debugger macros
|
|||
arrays macros splitting combinators prettyprint.backend
|
||||
definitions prettyprint hashtables prettyprint.sections sets
|
||||
sequences.private effects generic compiler.units accessors
|
||||
locals.backend ;
|
||||
locals.backend memoize ;
|
||||
IN: locals
|
||||
|
||||
! Inspired by
|
||||
|
@ -298,6 +298,8 @@ MACRO: with-locals ( form -- quot ) lambda-rewrite ;
|
|||
|
||||
: MACRO:: (::) define-macro ; parsing
|
||||
|
||||
: MEMO:: (::) define-memoized ; parsing
|
||||
|
||||
<PRIVATE
|
||||
|
||||
! Pretty-printing locals
|
||||
|
|
|
@ -39,8 +39,7 @@ IN: memoize
|
|||
over H{ } clone "memoize" set-word-prop
|
||||
over make-memoizer define ;
|
||||
|
||||
: MEMO:
|
||||
CREATE-WORD parse-definition define-memoized ; parsing
|
||||
: MEMO: (:) define-memoized ; parsing
|
||||
|
||||
PREDICATE: memoized < word "memoize" word-prop ;
|
||||
|
||||
|
|
Loading…
Reference in New Issue