do i have this right? ```/** left identity */ obje...
# arrow
j
do i have this right?
Copy code
/** left identity */
object `⟳` {
      operator fun <T> invoke(t: T) = { t: T -> t } 
}

/** left identity */
val <T> T.`⟳` get() =   `⟳` ( this) 
/**right identity*/
val <T> T.`⟲` get() = { this }
r
I’ve never seen it it encoded like that. We usually encode it like this:
Copy code
fun <A> A.identity(): A = this
fun <A> identity(ev: A): A = ev
j
https://wiki.haskell.org/Monad_laws plus also milos whiteboarded the circle arrows for left and right.
my haskellize is less than perfect
r
those are in the monoid laws
j
i noted in the lecture that right identity was being used to lift a into a .
( G
F) verbatim. This works in kotlin type checking for my Vector abstraction which appears to fulfil the semigroup where a ( G
F) does not cooperate on an infix viable basis. i have backwards and forards composition of the same basic functors as below. IOMemento.IoLocalDate to Tokenized( dateMapper
trim
btoa
bb2ba, { a, b -> a.putLong(b.toEpochDay()) }), IOMemento.IoInstant to Tokenized( bb2ba
btoa
trim
instantMapper, { a, b -> a.putLong(b.toEpochMilli()) })
im assuming that if i am following the same basic cat thoery blueprints as arrow that i will be in range of type-aliasing much of this onto arrow constructs, or at least will learn where it's different
r
yes, there may be differences or missing abstractions in Arrow as well