Sha256: 48693743144c1a567ed983d495e5118df12170f31c1eb335ef2fff52437e4106
Contents?: true
Size: 345 Bytes
Versions: 3
Compression:
Stored size: 345 Bytes
Contents
require 'hamster/list' module Hamster module CoreExt module Enumerable def to_list list = EmptyList reverse_each { |item| list = list.cons(item) } list end end end end module Enumerable include Hamster::CoreExt::Enumerable end class Array include Hamster::CoreExt::Enumerable end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
hamster-0.2.8 | lib/hamster/core_ext/enumerable.rb |
hamster-0.2.7 | lib/hamster/core_ext/enumerable.rb |
hamster-0.2.6 | lib/hamster/core_ext/enumerable.rb |