hi folks, i am currently trying to learn more abou...
# arrow
a
hi folks, i am currently trying to learn more about functional programming and arrow. as an exercise and inspired by https://github.com/arrow-kt/arrow/issues/1747 i tried to implement the semialign typeclass with instances for some arrow types (Id, Option, ListK, MapK, Nel, SequenceK). would there be interest for a PR? i would definitely need some guidance and review around the implementation.
i start with some questions regarding my implementation of the laws. i tried to port the semialign laws (https://hackage.haskell.org/package/semialign-1.1/docs/Data-Semialign.html) my implementation: https://github.com/abendt/arrow/blob/semialign/modules/core/arrow-test/src/main/kotlin/arrow/test/laws/SemialignLaws.kt i do not understand the idempotency law here so its still missing in my implementation. i don't understand the haskell code here (esp. the join function). how does join work? the haskell doc for Alignedness contains two code blocks that only differ in ≡ vs = . i do not understand the implications of that. have i implemented this law correctly? or do i need to add something? the end of the file contains some functionality (assoc, justHere) that's needed by the laws but does not seem to exist in arrow yet. as an excercise i implemented assoc/unassoc for a couple of types. could this be another PR?
j
I'll take a look in 1-2 hours, but thanks for starting this 🙂
👍🏾 1
btw can you open that as a pr for arrow? That way adding comments and discussing things directly on source is easier 🙂
a