Is $< enumerable

74 views Asked by At

$< is used with map in the following code.

Is $< enumerable?

$<.map{|l|p (0..9).to_a.repeated_permutation(4).count{|m|m.inject(&:+)==l.to_i}}
1

There are 1 answers

0
user229044 On

Yes. It's an alias of ARGF which inherits directly from Object and includes Enumerable.