merging in master

This commit is contained in:
Jeremy Ashkenas
2009-12-28 20:06:23 -05:00
21 changed files with 295 additions and 299 deletions

View File

@@ -1,4 +1,8 @@
nums: n * n for n in [1, 2, 3] if n % 2 isnt 0.
result: n * 2 for n in nums.
results: n * 2 for n in nums.
print(result.join(',') is '2,18')
# next: for n in [1, 2, 3] if n % 2 isnt 0
# print('hi') if false
# n * n * 2.
print(results.join(',') is '2,18')

View File

@@ -1,5 +1,8 @@
nums: i * 3 for i in [1..3].
result: nums.join(', ')
negs: x for x in [-20..-10].
negs: negs[0..2]
print(result is '3, 6, 9')
result: nums.concat(negs).join(', ')
print(result is '3, 6, 9, -20, -19, -18')