Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #2607
| From | David Lamb <dalamb@cs.queensu.ca> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Refactoring discovery |
| References | <kbgoo6dfrkh58r3ogel9nb6rekrs258it2@4ax.com> <imi716$qhk$1@dont-email.me> <values-20110326204223@ram.dialup.fu-berlin.de> |
| Message-ID | <BbMkp.1469$0s5.278@newsfe17.iad> (permalink) |
| Date | 2011-03-30 16:15 -0400 |
On 26/03/2011 3:43 PM, Stefan Ram wrote:
> Joshua Cranmer<Pidgeot18@verizon.invalid> writes:
>> But mathematical functions return only one value;
>
> In mathematics, there is no clear-drawn distinction between
> »one value« and »multiple values«. For example, one
> says that f, defined as f(x,y):=x+y, is a function of
> »two arguments«, yet one usually gives »f: R × R -> R«,
> which literally means: it is a function of /one/ argument,
> which happens to be a pair. And of course, one can have
> functions ... -> R x R.
>
And out of left field comes currying and/or closures:
g: x -> (y -> z)
where (f(x))(y) = g(x,y). But it's sometimes annoying that leaving
unbound the "second argument" of what you though of as a 2-argument
function is privileged over leaving the 1st argument unbound.
Back to comp.lang.java.programmer | Previous | Next | Find similar
Re: Refactoring discovery David Lamb <dalamb@cs.queensu.ca> - 2011-03-30 16:15 -0400
csiph-web