3 ms·
Thanks for the nicely written Python/Rust comparison :-) Is Rust's flat_map() equivalent to this in Python? def flat_map(func, it): return map(fun
by raymondh 9y ago
Thanks for the nicely written Python/Rust comparison :-)
Is Rust's flat_map() equivalent to this in Python?
def flat_map(func, it):
return map(func, chain.from_iterable(it))
- edflsafoiewq 9y agoNo, it's def flat_map(func, it): return chain.from_iterable(map(func, it))
- deleted 9y ago[deleted]