MCPcopy 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

1def identity(x):
2 return x
3
4def foldsh(tree, branch= lambda tree,ch: list(ch), leaf=identity, shared=identity, getchildren=iter):
5 '''Sharing-aware tree transformations.

Callers 2

recipe-576458.pyFile · 0.50
recipe-390208.pyFile · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected