2009-03-23 18:12:41 -04:00
|
|
|
! Copyright (C) 2007, 2009 Slava Pestov, Daniel Ehrenberg.
|
2007-09-20 18:09:08 -04:00
|
|
|
! See http://factorcode.org/license.txt for BSD license.
|
2009-03-23 18:12:41 -04:00
|
|
|
USING: help.syntax help.markup words quotations effects ;
|
2008-01-06 22:36:34 -05:00
|
|
|
IN: memoize
|
2007-09-20 18:09:08 -04:00
|
|
|
|
|
|
|
HELP: define-memoized
|
2009-03-23 18:12:41 -04:00
|
|
|
{ $values { "word" word } { "quot" quotation } { "effect" effect } }
|
2007-09-20 18:09:08 -04:00
|
|
|
{ $description "defines the given word at runtime as one which memoizes its output given a particular input" }
|
|
|
|
{ $notes "A maximum of four input and four output arguments can be used" }
|
|
|
|
{ $see-also POSTPONE: MEMO: } ;
|
|
|
|
|
|
|
|
HELP: MEMO:
|
|
|
|
{ $syntax "MEMO: word ( stack -- effect ) definition ;" }
|
|
|
|
{ $description "defines the given word at parsetime as one which memoizes its output given a particular input. The stack effect is mandatory." }
|
|
|
|
{ $notes "A maximum of four input and four output arguments can be used" }
|
|
|
|
{ $see-also define-memoized } ;
|