Doubt about funs

Chandrashekhar Mullaparthi Chandrashekhar.Mullaparthi@REDACTED
Wed Feb 21 15:22:54 CET 2001

IMHO, adding the arity in the fun specification will not add any more value.
On the contrary, it'll be a bit of a pain when we want to write code like:

somefunc(Fun) ->
    Pattern1 -> Fun(a,b);
    Pattern2 -> Fun(a,b,c)


> -----Original Message-----
> From: Lon Willett [mailto:Lon.Willett@REDACTED]
> Sent: 21 February 2001 13:44
> To: erlang-questions@REDACTED
> Cc: Paulo Ferreira
> Subject: Re: Doubt about funs
> So has anyone considered implementing a syntax like "fun 
> Mod:Fun/Arity"?
> It seems like an obvious thing to do.  And even a naive implementation
> which just replaced the expression with "{M,F}" (losing the arity)
> would at least provide a nice consistent way to express the intent.  A
> good implementation would produce some dynamic function object that
> was efficient, contained the arity, and was robust across code change.
> /Lon
> -- 
> Lon Willett <Lon.Willett@REDACTED>
> Security Architect, SSE Ltd.
> Fitzwilliam Court, Leeson Close
> Dublin 2, Ireland
> +353-1-216-2946
> +353-87-8053539 (mobile)

This email (including attachments) is confidential.  If you have received
this email in error please notify the sender immediately and delete this
email from your system without copying or disseminating it or placing any
reliance upon its contents.  We cannot accept liability for any breaches of
confidence arising through use of email.  Any opinions expressed in this
email (including attachments) are those of the author and do not necessarily
reflect our opinions.  We will not accept responsibility for any commitments
made by our employees outside the scope of our business.  We do not warrant
the accuracy or completeness of such information.

More information about the erlang-questions mailing list