array recursion test, took a long time to find that annoying bug.

This commit is contained in:
Dave Halter
2014-04-30 11:50:21 +02:00
parent 8edaea31e2
commit 5a6eabb364

View File

@@ -334,3 +334,18 @@ tuple((1,))[0]
# implementation detail for lists, should not be visible
#? []
list().__iterable
# -----------------
# Recursions
# -----------------
def to_list(iterable):
return list(set(iterable))
def recursion1(foo):
return to_list(to_list(foo)) + recursion1(foo)
#? int()
recursion1([1,2])[0]