Issue Details (XML | Word | Printable)

Key: BOO-1124
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Cedric Vivier
Reporter: Cedric Vivier
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Boo

yieldAll : allow multiple enumerable arguments

Created: 20/Jan/09 06:02 PM   Updated: 21/Jan/09 04:57 AM   Resolved: 21/Jan/09 04:57 AM
Return to search
Component/s: Compiler
Affects Version/s: 0.8.2
Fix Version/s: 0.9

Time Tracking:
Not Specified

Testcase included: yes


 Description  « Hide

Testcase:

"""
4
8
15
16
23
42
"""
import System.Collections.Generic

def ElementsFromLargerListFirst(a as IList[of int], b as IList[of int]):
	if a.Count > b.Count:
		yieldAll a, b
	else:
		yieldAll b, a


a = List[of int]()
a.Add(23)
a.Add(42)
b = List[of int]()
b.Add(4)
b.Add(8)
b.Add(15)
b.Add(16)

for i in ElementsFromLargerListFirst(a, b):
	print i


Cedric Vivier added a comment - 21/Jan/09 04:57 AM

Landed in rev. 3148