mirror of
https://github.com/hmemcpy/milewski-ctfp-pdf.git
synced 2024-11-26 03:11:47 +03:00
Prod -> Product in Scala snippets too
This commit is contained in:
parent
8e5c7b46e5
commit
3230b5f9b1
@ -1,3 +1,3 @@
|
||||
def counit[S, A](a: Prod[S, Reader[S, A]]): A = a match {
|
||||
case Prod((Reader(f), s)) => f(s)
|
||||
def counit[S, A](a: Product[S, Reader[S, A]]): A = a match {
|
||||
case Product((Reader(f), s)) => f(s)
|
||||
}
|
@ -1,2 +1,2 @@
|
||||
def unit[S, A](a: A): Reader[S, Prod[S, A]] =
|
||||
Reader(s => Prod((a, s)))
|
||||
def unit[S, A](a: A): Reader[S, Product[S, A]] =
|
||||
Reader(s => Product((a, s)))
|
Loading…
Reference in New Issue
Block a user