Live data from Hacker News

Ask HN: How to be fluent in functional language speak?

news.ycombinator.com

111–112 of 112 posts

Re: Ask HN: How to be fluent in functional language speak?

#111

Earlier quoted context omitted.

I can't think of any way for 1 * 1 to be concatenation. I think the point GP was making is that a monoid has something to do with a function f that takes two arguments a and b where there is a single value for b such that f(a, special_value) == a. I think. As someone who doesn't really understand FP concepts I would probably call those functions "functions that can sensibly be used in a call to array.reduce"

> As someone who doesn't really understand FP concepts I would probably call those functions "functions that can sensibly be used in a call to array.reduce" So reduceables?

That implies that they can be reduced. Maybe "reductors"?

That said, I am on the "name abstractions after the math" side of things. It makes it much clearer what guarantees I have when working with the interface, on either side of it.

Re: Ask HN: How to be fluent in functional language speak?

#112

Earlier quoted context omitted.

Well, Functor is a bit of a misnomer; it really should be called TypeEndofunctor. The short form was really adopted as a mischievous pun on the use of "functor" in the OOP community.

I don't think TypeEndofunctor conveys any additional information when discussing a Haskell typeclass. > The short form was really adopted as a mischievous pun on the use of "functor" in the OOP community. Citation needed.

I should note that naming things with mischievous puns certainly wasn't beyond early Haskellers - that's the origin of `return` as a name for part of the Monad interface (since quasi-deprecated in favor of `pure`).

I just have never heard that allegation about `functor`, which seems to have been taken directly from mathematics that predate any notion of function object. It's possible that OO programmers and the mathematicians both borrowed it from the same source (it seems to have originated in linguistics).

Post reply on HN