This sounds like a really interesting question. To save some people weeding
through the thread and Jon Harrop's usual trolling garbage, here's a
description of the problem:
[quote]
Here's [a]language to to interpret (where postfix * means tupling):

Variables: x
Integer literals: i
Terms:

t = Lambda x*. t
  |  Apply t t*
  |  Var(x)
  |  Num(i)

We assume usual operational semantics of lambda calculus (i.e. static
scoping).

The task is to write two interpreters, one with variables x being
DeBruijn indices and one with them being names.
You should go for maximal sharing, i.e. factor out commonalities into
a common class/typeclass/functor/whatever, so that there remains no
duplication of code in the two solutions.
[/quote]


On Mon, May 4, 2009 at 6:05 AM, Paolo Losi <[email protected]> wrote:

> Hi all,
>
> I'm following an interesting thread on the scala mailing list:
>
> http://www.nabble.com/-scala--usefulness-of-OOP-td23268250.html
>
> Martin Odersky advocates the OO features of the scala language
> proposing an interesting problem where the OO approach seams
> valuable.
>
> I would be very much interested in seeing an Haskell solution
> to that problem. Any haskell guru want to take a stub at it
> or give an opinion from a pure FP point of view?
>
> Thanks
> Paolo
>
> _______________________________________________
> Haskell-Cafe mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to