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

Method bind

returns/io.py:866–868  ·  view source on GitHub ↗

Composes this container with a function returning ``IOResult``.

(self, function)

Source from the content-addressed store, hash-verified

864 if not TYPE_CHECKING: # noqa: WPS604 # pragma: no branch
865
866 def bind(self, function):
867 """Composes this container with a function returning ``IOResult``.""" # noqa: E501
868 return function(self._inner_value.unwrap())
869
870 #: Alias for `bind_ioresult` method. Part of the `IOResultBasedN` interface. # noqa: E501
871 bind_ioresult = bind

Callers 2

test_bindFunction · 0.95

Calls 1

unwrapMethod · 0.45

Tested by 2

test_bindFunction · 0.76