Minor tweaks on Parser
This commit is contained in:
parent
4ddef44cc2
commit
64e3eb063c
4 changed files with 86 additions and 69 deletions
|
|
@ -62,7 +62,7 @@ class Success(Result[S]):
|
|||
return False
|
||||
|
||||
def fmap(self, func: Callable[[S], S2]) -> Result[S2]:
|
||||
return Result.of(func(self.value)) # type: ignore
|
||||
return Result.of(func(self.value))
|
||||
|
||||
def bind(self, func: Callable[[S], Result[S2]]) -> Result[S2]:
|
||||
return func(self.value)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue