[backport] run nimpretty on the remaining files
This commit is contained in:
parent
34d0be2ec1
commit
5732bb41ef
13 changed files with 457 additions and 414 deletions
|
|
@ -258,7 +258,7 @@ proc map*[T, R](self: Option[T], callback: proc (input: T): R): Option[R] =
|
|||
assert $(b.map(isEven)) == "None[bool]"
|
||||
|
||||
if self.isSome:
|
||||
some[R]( callback(self.val) )
|
||||
some[R](callback(self.val))
|
||||
else:
|
||||
none(R)
|
||||
|
||||
|
|
@ -273,7 +273,8 @@ proc flatten*[A](self: Option[Option[A]]): Option[A] =
|
|||
else:
|
||||
none(A)
|
||||
|
||||
proc flatMap*[A, B](self: Option[A], callback: proc (input: A): Option[B]): Option[B] =
|
||||
proc flatMap*[A, B](self: Option[A],
|
||||
callback: proc (input: A): Option[B]): Option[B] =
|
||||
## Applies a `callback` function to the value of the `Option` and returns an
|
||||
## `Option` containing the new value.
|
||||
##
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue