[Haskell-cafe] I just don't get it (data structures and OO)

Felipe Almeida Lessa felipe.lessa at gmail.com
Sun Jun 3 08:02:35 EDT 2007


On 6/3/07, Tillmann Rendel <rendel at rbg.informatik.tu-darmstadt.de> wrote:
> In functional programming, problems of the kind "and the same code for
> all functions doing something related" are most often solved by
> introducing higher order functions. Let's try to decompose the problem
> as follows:
[snip]

Now I've got one question ;).  Is it *efficient* to go down this way?
You are recreating (parts of) two lists and checking every planet,
every time you need to change something. Maybe using a Map instead of
a list would at least let the complexity go down a little bit? Or am I
missing something?

Cheers, =)

-- 
Felipe.


More information about the Haskell-Cafe mailing list