Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ActiveState/code
/ identity
Function
identity
recipes/Python/578117_Sharingaware_tree/recipe-578117.py:1–2 ·
view source on GitHub ↗
(x)
Source
from the content-addressed store, hash-verified
1
def
identity(x):
2
return
x
3
4
def
foldsh(tree, branch=
lambda
tree,ch: list(ch), leaf=identity, shared=identity, getchildren=iter):
5
''
&
#x27;Sharing-aware tree transformations.
Callers
2
recipe-576458.py
File · 0.50
recipe-390208.py
File · 0.50
Calls
no outgoing calls
Tested by
no test coverage detected