kierans777
06/03/2021, 4:52 AMf compose g
in my code. However why is compose
an infix function? That's the sort of documentation I'm after, and I'm hoping someone can point me in the right direction. 😄simon.vergauwen
06/03/2021, 7:37 AMHowever why isSuch things will not get documented in the library, given that their language features and unrelated to Arrow. Thean infix function?compose
infix
modifier allows you to call it f compose g
or f.compose(g)
.
Here is a part of the doc that I find really interesting in regards to how to compose functions and signatures. https://arrow-kt.io/docs/effects/io/kierans777
06/03/2021, 7:42 AMSuch things will not get documented in the library, given that their language features and unrelated to Arrow.Personally, I think a page on "coming to Arrow from other places" might be a worthwhile investment. What I found really confusing having done Clojure, Crocks (JS), etc is
f compose g
or f.compose(g)
(ie: a method like call) when typically the function comes first ie: compose(g, f)
. I found the same issue when trying to curry my functions eg: f.curried()(a)(b)(c).
simon.vergauwen
06/03/2021, 7:49 AMcompose(g, f)
would be considered very uncommon in Kotlin.
So maybe a small document explaining what the typical Arrow signatures look like, would be sufficient?kierans777
06/03/2021, 7:50 AM