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