[lang-ref] ( map_with_named_function ) ( python )
def test_map_with_named_function():
def double(x):
return x * 2
items = [1, 2, 3]
r = list(map(double, items))
assert r == [2, 4, 6]
def test_map_with_named_function():
def double(x):
return x * 2
items = [1, 2, 3]
r = list(map(double, items))
assert r == [2, 4, 6]