MCPcopy Index your code
hub / github.com/dry-python/returns / map

Method map

returns/maybe.py:419–421  ·  view source on GitHub ↗

Composes current container with a pure function.

(self, function)

Source from the content-addressed store, hash-verified

417 return self._inner_value
418
419 def map(self, function):
420 """Composes current container with a pure function."""
421 return Some(function(self._inner_value))
422
423 def apply(self, container):
424 """Calls a wrapped function in a container on this container."""

Callers 1

applyMethod · 0.95

Calls 1

SomeClass · 0.85

Tested by

no test coverage detected