Hacker News new | ask | show | jobs
by acqq 2262 days ago
> I know Wikipedia isn't supposed to be a textbook, but I'd argue that having a more accessible first paragraph or summary section on every topic could help all uses

I'm curious how you would rewrite that first paragraph then:

"In mathematics and computer science, currying is the technique of translating the evaluation of a function that takes multiple arguments into evaluating a sequence of functions, each with a single argument. For example, a function that takes two arguments, one from X and one from Y, and produces outputs in Z, by currying is translated into a function that takes a single argument from X and produces as outputs functions from Y to Z. Currying is related to, but not the same as, partial application."

BTW I don't like that paragraph, it looks to me that it completely "misses the point" because as far as I understand currying is not about the sets but about the arguments. If it would be about the sets it would be just "a rewrite to a function that accepts the subset of the previous input set" and it's not about that.

1 comments

from a certain perspective, it's hard to talk about currying without talking about sets. "function" itself is defined as a special type of relation between sets. imo, the first paragraph does a good job introducing both the formal and practical meaning of currying to people who have enough background to find the topic useful.

simple wikipedia does take your approach though:

> Currying is a technique used in mathematics and computer science that consists of changing a function that takes several arguments into a number of functions that each take one argument. Mathematicians Moses Schönfinkel and Gottlob Frege laid the groundwork for this technique, which is named after Haskell Brooks Curry. Currying is used in Lambda calculus. Some programming languages, such as ML and Haskell say that functions can only have one argument. [0]

that's actually the entire article. not sure how useful it is, but at least they tried.

[0] https://simple.wikipedia.org/wiki/Currying

I still believe that naming the sets in the paragraph I've quoted is completely superfluous in the sentence I've quoted. It just sounds more "mathy" but I'm quote sure that either it doesn't convey more useful information or it is not formal enough to be exact enough, so to me it looks it fails both ways.