Boo

yieldAll : allow multiple enumerable arguments

Details

  • Type: Improvement Improvement
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 0.8.2
  • Fix Version/s: 0.9
  • Component/s: Compiler
  • Labels:
    None
  • Testcase included:
    yes
  • Number of attachments :
    0

Description

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

Activity

Hide
Cedric Vivier added a comment -

Landed in rev. 3148

Show
Cedric Vivier added a comment - Landed in rev. 3148

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: