Path: news.cs.au.dk!not-for-mail From: Ole Lehrmann Madsen Newsgroups: comp.lang.beta Subject: Re: Curry Date: 20 Oct 1999 23:08:07 -0000 Organization: University of Aarhus, Department of Computer Science (DAIMI) Lines: 49 Approved: mailtonews@cs.au.dk Distribution: world Message-ID: <19991020230807.24626.qmail@noatun.mjolner.dk> Reply-To: Ole Lehrmann Madsen NNTP-Posting-Host: daimi.cs.au.dk X-Trace: xinwen.cs.au.dk 940460900 137946 255.255.255.255 (20 Oct 1999 23:08:20 GMT) X-Complaints-To: news@cs.au.dk NNTP-Posting-Date: 20 Oct 1999 23:08:20 GMT Xref: news.cs.au.dk comp.lang.beta:12119 > How to write the curry function in beta ? >=20 > In haskell we write things like that: >=20 > curry f x y =3D f(x,y) >=20 > add(x,y) =3D x+y > addc =3D curry add > inc =3D addc 1 > =20 > Is this possible in haskell ?? >=20 > I write those things in beta, but my function curry > is not generic. Moreover we can't make easyly anonymous function in BETA,= why=20 ?? >=20 > I mean that i must write : >=20 >=20 > curry : (# anonsub: (# .... #) > ... > exit anonsub## > #) > =20 >=20 > Why can't we write > exit (# .... #)## >=20 This was simply forgotten when the syntax for pattern variables was added to the BETA grammar. There are no problems in supporting=20 such anonymous functions - we will probably do it in some future release. It will unfortunately not be in the fortcoming r5.0. I assume that you also saw the answer by Kasper =D8sterbye? In=20 =09Madsen, M=F8ller-Pedersen, Nygaard: =09OO Programming in the BETA Language, =09Addsion Wesley/ACM Press =09 the examples in section 12.2 may be useful. ---olm =20 > --=20 > pad