sys::Int have useful sys::Int.times: z.times{...} is (0..<z).each{...}
sys::Int
sys::Int.times
z.times{...}
(0..<z).each{...}
My suggestion: sys::Int.yields: z.yields{...} is (0..<z).map{...}
z.yields{...}
(0..<z).map{...}
I need yields no less frequently than times.
yields
times
I would say that case is best addressed by (0..<z).each{}
(0..<z).each{}
I don't get it? How is (0..<z).map{...} best addressed by (0..<z).each{}?
Sorry, I misunderstood the request.
I can see the value for something like yields (not sure I like taking that name for this though).
What do others think? Is this a common use for others?
AFAIR I never encountered it, but I'll look for it.
Login or Signup to reply.
Akcelisto Mon 19 Jul 2010
sys::Int
have usefulsys::Int.times
:z.times{...}
is(0..<z).each{...}
My suggestion: sys::Int.yields:
z.yields{...}
is(0..<z).map{...}
I need
yields
no less frequently thantimes
.brian Mon 19 Jul 2010
I would say that case is best addressed by
(0..<z).each{}
helium Tue 20 Jul 2010
I don't get it? How is
(0..<z).map{...}
best addressed by(0..<z).each{}
?brian Tue 20 Jul 2010
Sorry, I misunderstood the request.
I can see the value for something like yields (not sure I like taking that name for this though).
What do others think? Is this a common use for others?
helium Tue 20 Jul 2010
AFAIR I never encountered it, but I'll look for it.