Sha256: b4d74c92a22ce7ff473a6cfb2faad0f5aef96082bad9f4b7e4388f34a9955cb9
Contents?: true
Size: 795 Bytes
Versions: 24
Compression:
Stored size: 795 Bytes
Contents
sum(nums...) sum = 0 for n in nums sum += n sum2(nums...) sum = 0 for n in nums sum += n sum * 2 sum3(nums...) sum = 0 sum += n for n in nums body foo sum(1,2,3,4) foo sum2(1,2,3,4) foo sum3(1,2,3,4) join(delim, args) buf = '' for arg, i in args buf += i ? delim + arg : arg join2(delim, args) buf = '' buf += i ? delim + arg : arg for arg, i in args body foo join(' ', foo bar baz) foo join(', ', foo bar baz) foo join2(' ', 1 2 3) foo join2(', ', 1 2 3) body fonts = Impact Arial sans-serif for font, i in fonts foo i font last-even(nums...) ret = n if n % 2 == 0 for n in nums ret first-even(nums...) return n if n % 2 == 0 for n in nums body foo last-even(1,3,30,5,6,12,2,24,3) foo first-even(1,3,30,5,6,12,2,24,3)
Version data entries
24 entries across 24 versions & 1 rubygems