Merge pull request #241 from bjorn/sequence_each

Added Sequence.each
This commit is contained in:
Bob Nystrom
2015-04-01 07:10:21 -07:00
8 changed files with 29 additions and 3 deletions
+7
View File
@@ -54,6 +54,13 @@ and counting the number of times the returned value evaluates to `true`.
[1, 2, 3].count {|n| n > 2} // 1.
[1, 2, 3].count {|n| n < 4} // 3.
### **each**(function)
Iterates over the sequence, passing each element to the given `function`.
:::dart
["one", "two", "three"].each {|word| IO.print(word) }
### **join**(sep)
Returns a string representation of the list. The string representations of the