Sha256: 564af2eac866b9da73fdeade1d84fa0ba863d612f57e9e1e58d48789bcca43c6

Contents?: true

Size: 150 Bytes

Versions: 12

Compression:

Stored size: 150 Bytes

Contents

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

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
spank-1.1.0 lib/spank/lambda_behaviours.rb
spank-1.0.1441140881 lib/spank/lambda_behaviours.rb
spank-1.0.1441140857 lib/spank/lambda_behaviours.rb
spank-1.0.1441140848 lib/spank/lambda_behaviours.rb
spank-1.0.1441140841 lib/spank/lambda_behaviours.rb
spank-1.0.1441140834 lib/spank/lambda_behaviours.rb
spank-1.0.1441140824 lib/spank/lambda_behaviours.rb
spank-1.0.1441140809 lib/spank/lambda_behaviours.rb
spank-1.0.1441140804 lib/spank/lambda_behaviours.rb
spank-1.0.1441140793 lib/spank/lambda_behaviours.rb
spank-1.0.1420314444 lib/spank/lambda_behaviours.rb
spank-0.0.1393558686 lib/spank/lambda_behaviours.rb