[backport] run nimpretty on the remaining files

This commit is contained in:
narimiran 2019-09-27 12:30:59 +02:00
commit 5732bb41ef
13 changed files with 457 additions and 414 deletions

View file

@ -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.
##