Skip to content

Suggestions from HN #220

@engelju

Description

@engelju

Since it peaked on HN1 a few hours ago, there were some suggestions on things we could improve:

From mjburgess:

These definitions don't really give you the idea, rather often just code examples..
"The ideas", in my view:

Monoid = units that can be joined together

Functor = context for running a single-input function

Applicative = context for multi-input functions

Monad = context for sequence-dependent operations

Lifting = converting from one context to another

Sum type = something is either A or B or C..

Product type = a record = something is both A and B and C

Partial application = defaulting an argument to a function

Currying = passing some arguments later = rephrasing a function to return a functions of n-1 arguments when given 1, st. the final function will compute the desired result

EDIT: Context = compiler information that changes how the program will be interpreted (, executed, compiled,...)

Eg., context = run in the future, run across a list, redirect the i/o, ...

From ncmncm:

  1. It should explain map somewhere before it is used.

  2. For the more abstruse and abstract concepts, a comment suggesting why anybody should care about this idea at all would be helpful. E.g., "A is just a name for what [familiar things] X, Y, and Z have in common."

  3. It goes off the rails halfway through. E.g. Lift.

From sanderjd:
Expanding on your #1, I think they could use some more definitions. As you say, they use "map" in its functional programming sense before defining it, but I think more confusing is this one:

A category in category theory is a collection of objects and morphisms between them.

What is a "morphism"?

I think this is a great starting point though, which could use some expansion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions