  
  [1X9 [33X[0;0YMemoisation[133X[101X
  
  [33X[0;0Y[5Xdatastructures[105X   provides  simple  ways  to  cache  return  values  of  pure
  functions.[133X
  
  
  [1X9.1 [33X[0;0YMemoisation with HashMap[133X[101X
  
  [1X9.1-1 MemoizeFunction[101X
  
  [33X[1;0Y[29X[2XMemoizeFunction[102X( [3Xfunction[103X[, [3Xoptions[103X] ) [32X function[133X
  [6XReturns:[106X  [33X[0;10YA function[133X
  
  [33X[0;0Y[10XMemoizeFunction[110X  returns  a  function  which  behaves  the same as [3Xfunction[103X,
  except that it caches the return value of [3Xfunction[103X. The cache can be flushed
  by calling [2XFlushCaches[102X ([14XReference: FlushCaches[114X).[133X
  
  [33X[0;0YThis function does not promise to never call [3Xfunction[103X more than once for any
  input  --  values may be removed if the cache gets too large, or GAP chooses
  to  flush all caches, or if multiple threads try to calculate the same value
  simultaneously.[133X
  
  [33X[0;0YThe  optional  second  argument  is  a  record  which  provides  a number of
  configuration options. The following options are supported.[133X
  
  [8X[10Xflush[110X[8X (default [9Xtrue[109X)[108X
        [33X[0;6YIf this is [9Xtrue[109X, the cache is emptied whenever [2XFlushCaches[102X ([14XReference:
        FlushCaches[114X) is called.[133X
  
  [8X[10Xcontract[110X[8X (defaults to [2XReturnTrue[102X ([14XReference: ReturnTrue[114X))[108X
        [33X[0;6YA  function that is called on the arguments given to [3Xfunction[103X. If this
        function returns [9Xfalse[109X, then [10XerrorHandler[110X is called.[133X
  
  [8X[10XerrorHandler[110X[8X (defaults to none)[108X
        [33X[0;6YA function to be called when an input that does not fulfil [10Xcontract[110X is
        passed to the cache.[133X
  
