[Haskell-cafe] Re: General function to count list elements?

Achim Schneider barsoap at web.de
Sun Apr 19 17:21:18 EDT 2009

Peter Verswyvelen <bugfact at gmail.com> wrote:

> Sometimes I do miss the pragmatic C solution:- two function pointers
> that are equal surely represent the same functions (although in C
> nothing is really sure ;)
In haskell, they would, but C doesn't give you the same guarantee:

int evil = 0;

int wicked( int i_dare_you ) {
    return i_dare_you + (++evil);

Clearly, wicked and wicked are the same function, but they surely
aren't indistinguishable, at least if you happen to call them.

(c) this sig last receiving data processing entity. Inspect headers
for copyright history. All rights reserved. Copying, hiring, renting,
performance and/or quoting of this signature prohibited.

More information about the Haskell-Cafe mailing list