This article was permanently moved to my personal website:
For further actions, you may consider blocking this person and/or reporting abuse
This article was permanently moved to my personal website:
For further actions, you may consider blocking this person and/or reporting abuse
S3CloudHub -
Dideriksen Ball -
Hexadecimal Software Pvt Ltd -
mkdev.me -
Top comments (4)
This is an absolute gem!
I've been working with functional programming for years (Haskell and Elm, and Elixir before) but always struggled with explaining the concept of a semigroup with real, useful examples. I particularly liked your line of explaining that ideas > implementation!
This is incredibly well done and I've already shared this series with a bunch of people.
Really looking forward to read more of these articles :)
Thanks a lot for your comment! I'm really glad you enjoyed the post!
Great job!
Just wondering if there are any common utils for Semigroups?
e.g. For Comparable typeclass/trait, I would expect a
sort
function. Do we have anything like this for Semigroups?Great question!
I feel like these sorts of abstractions are not that common in the OCaml world. For example, the
sort
function for a list just takes a comparator explicitly instead of working with an abstract module:With abstractions like Semigroups they're even less common in the OCaml standard library. I don't think they're popular outside as well (I rarely see them being used). But I'm trying to change this with my series and explain the value of these abstraction 😌