10 lines
130 B
Python
10 lines
130 B
Python
from pipe import Pipe
|
|
|
|
|
|
@Pipe
|
|
def flat_map(iterable, f):
|
|
ys = []
|
|
for x in iterable:
|
|
ys.extend(f(x))
|
|
return ys
|