🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.functional
Article #642

Re: Why curry? (Re: Why functional languages?)

#642
From: Andrew Koenig
Date: Sun, 04 Oct 1992 20:13
22 lines
1335 bytes
In article <TMB.92Oct4181821@arolla.idiap.ch> tmb@idiap.ch writes:

> Why _do_ people continue to use curried syntax when they just want a
> function with several arguments?

Perhaps because it makes partial application easier to write.

For example, if I want a vector whose elements are twice the corresponding
elements of x, I can write

	map (fn x => x * 2) x

or, if I have a curried multiply function, I can write

	map (mult 2) x

I suppose I might ask the complementary question: why should compilers
generate slower code for curried functions if I don't happen to make
use of that property?
-- 
				--Andrew Koenig
				  ark@europa.att.com
Technical Details
Message-ID: <23795@alice.att.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!att!allegra!alice!ark
References: <TMB.92Sep28144424@arolla.idiap.ch> <annius.717696151@freyr> <TMB.92Sep28223555@arolla.idiap.ch> <26463@castle.ed.ac.uk> <BvGz2u.2rv.1@cs.cmu.edu> <NICKH.92Oct2134230@VOILA.VENARI.CS.CMU.EDU> <TMB.92Oct4181821@arolla.idiap.ch>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!att!allegra!alice!ark
From: ark@alice.att.com (Andrew Koenig)
Newsgroups: comp.lang.functional
Subject: Re: Why curry? (Re: Why functional languages?)
Message-ID: <23795@alice.att.com>
Date: 4 Oct 92 20:13:31 GMT
Article-I.D.: alice.23795
References: <TMB.92Sep28144424@arolla.idiap.ch> <annius.717696151@freyr> <TMB.92Sep28223555@arolla.idiap.ch> <26463@castle.ed.ac.uk> <BvGz2u.2rv.1@cs.cmu.edu> <NICKH.92Oct2134230@VOILA.VENARI.CS.CMU.EDU> <TMB.92Oct4181821@arolla.idiap.ch>
Reply-To: ark@alice.UUCP ()
Organization: AT&T Bell Laboratories, Murray Hill NJ
Lines: 22