Sha256: 3c41406971ca1c74e12b7d81cc911f9ae7d9a9b0e0a7770b95052c5fb6ed03ea
Contents?: true
Size: 695 Bytes
Versions: 2
Compression:
Stored size: 695 Bytes
Contents
--- !ruby/object:RI::MethodDescription aliases: [] block_params: comment: - !ruby/struct:SM::Flow::P body: Directive for making your functions faster by trading space for time. When you "memoize" a method/function its results are cached so that later calls with the same arguments returns results in the cache instead of recalculating them. - !ruby/struct:SM::Flow::VERB body: " class T\n def initialize(a)\n @a = a\n end\n def a\n "#{@a ^ 3 + 4}"\n end\n memoize :a\n end\n\n t = T.new\n t.a.<em>id</em> == t.a.<em>id</em> #=> true\n" full_name: Module#memoize is_singleton: false name: memoize params: (*meths) visibility: public
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
facets-2.4.2 | doc/ri/Module/memoize-i.yaml |
facets-2.4.3 | doc/ri/Module/memoize-i.yaml |