News for hackers. Stuff that matters.
Re:Monads are monoids in the category of endofunctors by edflsafoiewq on Friday September 10, 2021 @10:17AM (#28481892)
Yes, but its usually obvious which one is meant, so you don't bother saying under what operation. Option is a monad under the same concatenation as Array, just think of them as arrays that always have length 0 or 1.
Re:Monads are monoids in the category of endofunctors by deepsun on Friday September 10, 2021 @02:50PM (#28485620)
How to concatenate Option-s? Btw your comment seems to contradict another sibling comment.
Re:Monads are monoids in the category of endofunctors by edflsafoiewq on Friday September 10, 2021 @03:43PM (#28486111)
Like I said, view them as an array with 0 or 1 element and do it just like for arrays. There are only three possibilities:

  [] => []
  [[]] => []
  [[a]] => [a]