News for hackers. Stuff that matters.
Re:Functional Programming Jargon by dualogy on Tuesday November 07, 2017 @12:14PM (#15645238)
> "Since these rules govern composition at very abstract level, category theory is great at uncovering new ways of composing things."

I understood this much already prior. What I'd like next now are at least a handful (half-dozen-or-so) of concrete and truly compelling examples of such "uncoverings" ;)

OK, 1 or 2 would also be a start

Re:Functional Programming Jargon by thedufer on Tuesday November 07, 2017 @07:05PM (#15648939)
Here's a couple:

Monads are so pervasive that multiple languages have determined that they deserve special syntax (see: Haskell's do-notation, OCaml's let-syntax). Those syntaxes play nicely with a ton of seemingly-different types, such as promises, options (maybes/nullables), lists, monadic error handling (either, or_error), etc.

On a similar note, recognizing the structure of monads has in the past allowed me to abstract things in an interesting way. For example, say I have a dict lookup function (takes a key, returns a value) and I want to build a bunch of useful functions on top of that. But we want to use them in many different contexts - the dict might be remote or locally in memory (promises vs. not) and we may or may not be in a test context (monadic vs exception-based error-handling). By recognizing that we can just abstract over monads, we can easily handle these 4 cases (promise, promise+error monad, error monad, unit monad).

Re:Functional Programming Jargon by jw- on Tuesday November 07, 2017 @08:06PM (#15649221)
By OCaml's let syntax do you mean this: https://blog.janestreet.com/let-syntax-and-why-you-should-us...?

You can also add F# computation expressions to the list!

Re:Functional Programming Jargon by thedufer on Tuesday November 07, 2017 @09:34PM (#15649545)
Yes, that's what I mean by let syntax. The implementation and more description can be found at https://github.com/janestreet/ppx_let

I failed to find F# computation expressions, probably because I searched for the word "monad" which they seem to be avoiding, but that's another great example.

Re:Functional Programming Jargon by noblethrasher on Wednesday November 08, 2017 @12:00PM (#15654288)
Also, LINQ as realized in C# and VB. Crucially, `SelectMany` is just monadic bind.