Home
Press ? for keyboard navigation
❮
Range using a class
Range - count
❯
Range - sum
An example using a range and sum together in a one-line statement.
examples/range/range_sum.cr
res
=
(
0
..
3
)
.
sum
{
|
ix
|
ix
*
ix
}
puts
res
Index (i)
Table of Contents (t)
Indexed keywords (k)
Chapter TOC (d)
Hide/Show (h)