Skip to content

Commit 1661cad

Browse files
committed
Add Id methods as per review
1 parent f0a747b commit 1661cad

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

core/src/main/scala/cats/package.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,8 @@ package object cats {
110110
override def distribute[F[_], A, B](fa: F[A])(f: A => B)(implicit F: Functor[F]): Id[F[B]] = F.map(fa)(f)
111111
override def map[A, B](fa: A)(f: A => B): B = f(fa)
112112
override def as[A, B](fa: A, b: B): B = b
113+
override def void[A](fa: A): Unit = ()
114+
override def unit: Unit = ()
113115
override def tupleLeft[A, B](fa: A, b: B): (B, A) = (b, fa)
114116
override def tupleRight[A, B](fa: A, b: B): (A, B) = (fa, b)
115117
override def fproduct[A, B](fa: A)(f: A => B): (A, B) = (fa, f(fa))

0 commit comments

Comments
 (0)