Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added a default id for Arrow #2072

Merged
merged 6 commits into from
Dec 6, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
remove whitespace
  • Loading branch information
kailuowang committed Dec 6, 2017
commit 3ff449fd5587942365bb387b00d8fa0b92caa4e1
4 changes: 2 additions & 2 deletions core/src/main/scala/cats/arrow/Arrow.scala
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ import simulacrum.typeclass
* library `Control.Arrow`, this function is called `arr`.
*/
def lift[A, B](f: A => B): F[A, B]

override def id[A]: F[A, A] = lift(identity)

override def dimap[A, B, C, D](fab: F[A, B])(f: C => A)(g: B => D): F[C, D] =
compose(lift(g), andThen(lift(f), fab))

Expand Down