Sha256: b99d3021a0adb65cd14df6084567c0a5c97d6de1e30f7434d85fbc63c79a130f

Contents?: true

Size: 158 Bytes

Versions: 5

Compression:

Stored size: 158 Bytes

Contents

module Spank
  module LambdaBehaviours
    def memoize(lambda_method)
      lambda { |container| @cache ||= lambda_method.call(container) }
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
spank-0.0.1385937112 lib/spank/lambda_behaviours.rb
spank-0.0.1369197619 lib/spank/lambda_behaviours.rb
spank-0.0.1369197478 lib/spank/lambda_behaviours.rb
spank-0.0.2 lib/spank/lambda_behaviours.rb
spank-0.0.1 lib/spank/lambda_behaviours.rb