Skip to content

Commit

Permalink
Cleanup of small typos (#1122)
Browse files Browse the repository at this point in the history
  • Loading branch information
RayanRal authored Apr 25, 2023
1 parent 525acbd commit 82311fd
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion core/shared/src/main/scala/zio/prelude/Associative.scala
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ object Associative extends AssociativeLowPriority {
}

/**
* The `Commutative` and `Inverse` instance for the sum of `Narutal` values.
* The `Commutative` and `Inverse` instance for the sum of `Natural` values.
*/
implicit val NaturalSumCommutativeInverse: Commutative[Sum[Natural]] with Inverse[Sum[Natural]] =
new Commutative[Sum[Natural]] with Inverse[Sum[Natural]] {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1068,7 +1068,7 @@ object AssociativeBoth extends AssociativeBothLowPriority {
/**
* The `IdentityBoth` instance for `Chunk`.
*/
implicit val ChunkIdentityeBoth: IdentityBoth[Chunk] =
implicit val ChunkIdentityBoth: IdentityBoth[Chunk] =
new IdentityBoth[Chunk] {
def any: Chunk[Any] = Chunk.unit
def both[A, B](fa: => Chunk[A], fb: => Chunk[B]): Chunk[(A, B)] = fa.flatMap(a => fb.map(b => (a, b)))
Expand Down
8 changes: 4 additions & 4 deletions core/shared/src/main/scala/zio/prelude/Debug.scala
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ object Debug extends DebugVersionSpecific {

/**
* A `Repr` is a structured representation of a value of that can be rendered
* into various human readbale formats.
* into various human readable formats.
*/
sealed trait Repr { self =>

Expand Down Expand Up @@ -251,7 +251,7 @@ object Debug extends DebugVersionSpecific {
debug

/**
* Constructurs a `Debug` instance for a pair of a key and a value given
* Constructs a `Debug` instance for a pair of a key and a value given
* `Debug` instances for the key and value types.
*/
def keyValueDebug[A: Debug, B: Debug]: Debug[(A, B)] =
Expand Down Expand Up @@ -410,7 +410,7 @@ object Debug extends DebugVersionSpecific {
map => Repr.VConstructor(List("scala"), "Map", map.map(_.debug(keyValueDebug)).toList)

/**
* Derivves a `Debug[NonEmptyChunk[A]]` given a `Debug[A]`.
* Derives a `Debug[NonEmptyChunk[A]]` given a `Debug[A]`.
*/
implicit def NonEmptyChunkDebug[A: Debug]: Debug[NonEmptyChunk[A]] =
nonEmptyChunk => Repr.VConstructor(List("zio"), "NonEmptyChunk", nonEmptyChunk.map(_.debug).toList)
Expand All @@ -423,7 +423,7 @@ object Debug extends DebugVersionSpecific {
n => n

/**
* Dervies a `Debug[Option[A]]` given a `Debug[A]`.
* Derives a `Debug[Option[A]]` given a `Debug[A]`.
*/
implicit def OptionDebug[A: Debug]: Debug[Option[A]] = {
case None => Repr.Object(List("scala"), "None")
Expand Down
2 changes: 1 addition & 1 deletion core/shared/src/main/scala/zio/prelude/Inverse.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import scala.annotation.tailrec
* The `Inverse` type class describes an associative binary operator for a
* type `A` that has an identity element and an inverse binary operator.
* Combining any value with itself with the inverse operator must return the
* identity element. For example, for integer addition zero is an identty
* identity element. For example, for integer addition zero is an identity
* element and subtraction is an inverse operation, because subtracting any
* value from itself always returns zero.
*
Expand Down
6 changes: 3 additions & 3 deletions core/shared/src/main/scala/zio/prelude/These.scala
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ sealed trait These[+A, +B] { self =>
}

/**
* Folds each of the possibile cases into a summary value.
* Folds each of the possible cases into a summary value.
*/
final def fold[C](left: A => C, right: B => C)(both: (A, B) => C): C =
self match {
Expand All @@ -148,7 +148,7 @@ sealed trait These[+A, +B] { self =>
}

/**
* Transforms the successful result of this compuation with the specified
* Transforms the successful result of this computation with the specified
* effectual function, leaving any error value unchanged.
*/
final def forEach[F[+_]: IdentityBoth: Covariant, C](f: B => F[C]): F[These[A, C]] =
Expand Down Expand Up @@ -475,7 +475,7 @@ object These {
}

/**
* Constucts a `Both` with an `A` value and a `B` value.
* Constructs a `Both` with an `A` value and a `B` value.
*/
def both[A, B](a: A, b: B): These[A, B] =
Both(a, b)
Expand Down
2 changes: 1 addition & 1 deletion core/shared/src/main/scala/zio/prelude/ZValidation.scala
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ object ZValidation extends LowPriorityValidationImplicits {
value.fold[Validation[Unit, A]](fail(()))(succeed)

/**
* Construts a `Validation` from an `Option`, failing with the error
* Constructs a `Validation` from an `Option`, failing with the error
* provided.
*/
def fromOptionWith[E, A](error: => E)(value: Option[A]): Validation[E, A] =
Expand Down
2 changes: 1 addition & 1 deletion core/shared/src/main/scala/zio/prelude/fx/ZPure.scala
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ sealed trait ZPure[+W, -S1, +S2, -R, +E, +A] { self =>
/**
* Folds over the failed or successful results of this computation to yield
* a computation that does not fail, but succeeds with the value of the left
* or righr function passed to `fold`.
* or right function passed to `fold`.
*/
final def fold[S3 >: S2 <: S1, B](failure: E => B, success: A => B)(implicit
ev: CanFail[E]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ object Unfolder {
f(a)
}

implicit def Unfoldernvariant[Case[+_]: Covariant]: Invariant[({ type lambda[x] = Unfolder[Case, x] })#lambda] =
implicit def UnfolderInvariant[Case[+_]: Covariant]: Invariant[({ type lambda[x] = Unfolder[Case, x] })#lambda] =
new Invariant[({ type lambda[x] = Unfolder[Case, x] })#lambda] {
def invmap[A, B](f: A <=> B): Unfolder[Case, A] <=> Unfolder[Case, B] =
Equivalence(
Expand Down

0 comments on commit 82311fd

Please sign in to comment.