 : make/n ( table quot effect -- quot )
     [ unpack/pack '[ _ _ cache ] ] keep pack/unpack ;
 
-: make/1 ( table quot effect -- quot )
-    out>> [ packer compose '[ _ _ cache ] ] keep
-    unpacker compose ;
-
 : make/0 ( table quot effect -- quot )
     out>> [
         packer '[

    ] keep unpacker compose ;

: make-memoizer ( table quot effect -- quot )
    dup in>> length {
        { 0 [ make/0 ] }
        { 1 [ make/1 ] }
        [ drop make/n ]
    } case ;

PRIVATE>


! Copyright (C) 2007, 2010 Slava Pestov, Daniel Ehrenberg.
! See http://factorcode.org/license.txt for BSD license.
USING: kernel hashtables sequences sequences.private arrays
words namespaces make parser effects.parser math assocs effects
definitions quotations summary accessors fry hashtables.identity ;
IN: memoize

<PRIVATE
