def map(self, mapper: Callable[[Any], Any]) -> 'Identity':
        """Map a function over wrapped values."""
        value = self._value
        try:
            result = mapper(value)
        except TypeError:
            result = partial(mapper, value)

        return Identity(result)
def map ( self , mapper : Callable [ [ Any ] , Any ] ) -> 'Identity' : value = self . _value try : result = mapper ( value ) except TypeError : result = partial ( mapper , value ) return Identity ( result )
Map a function over wrapped values.