Add MEMO::

db4
Slava Pestov 2008-04-27 01:46:38 -05:00
parent 7d16edcc79
commit 6980050a83
2 changed files with 4 additions and 3 deletions

View File

@ -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

View File

@ -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 ;