This commit is contained in:
Awni Hannun
2023-11-30 11:50:36 -08:00
parent 266c4e3df6
commit db487e6b1a
6 changed files with 1 additions and 5 deletions

View File

@@ -1,5 +1,6 @@
# Copyright © 2023 Apple Inc.
def tree_map(fn, tree, *rest):
"""Applies ``fn`` to the leaves of the python tree ``tree`` and
returns a new collection with the results.