You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
classArray# Index operator.## a = [:a, :b, :c]# (a/1) #=> :aalias_method:/,:[]end
Along time ago WhyTheLuckyStiff had defined this as:
classArray# Partition an array into parts of given length.## CREDIT: WhyTheLuckyStiff ...def / leninject([])do |ary,x|
ary << []if[*ary.last].nitems % len == 0ary.last << xaryendendend
But this was deprecated b/c one could use 'each_slice(n).to_a' as of 1.9, instead.
The text was updated successfully, but these errors were encountered:
trans
changed the title
Good definition for Array#/?
Good definition for Array#/ ?
Apr 12, 2014
trans
changed the title
Good definition for Array#/ ?
Good definition for Array#/
Apr 12, 2014
Along time ago WhyTheLuckyStiff had defined this as:
But this was deprecated b/c one could use 'each_slice(n).to_a' as of 1.9, instead.
The text was updated successfully, but these errors were encountered: