[m-dev.] Automatic generation of map, foldr, foldl

Andrew Bromage bromage at cs.mu.OZ.AU
Wed Sep 9 12:54:18 AEST 1998


G'day all.

Lee Naish wrote:

> I've not counted the occurrences of "ad-hoc" in that post, but its "lots".
> The way people program is ad hoc.  The aim of this kind of work is to make
> programming *less* ad hoc.  How many times have you coded an instance of
> map?

Speaking personally, not as often as you might think.  What I tend to
need more often is something which is almost map but does something
completely un-map-like for one case at some deep level of nesting within
the type.

> Its not enough; under my proposal Mercury programmers could also define
> their own predicates!

Mercury programmers can already define their own predicates. :-)

Besides, it's all moot.  Every logic programmer knows that append is
Turing-complete.

Cheers,
Andrew Bromage



More information about the developers mailing list