POV-Ray : Newsgroups : povray.off-topic : Ratatouille : Re: Ratatouille Server Time
10 Oct 2024 23:20:38 EDT (-0400)
  Re: Ratatouille  
From: Orchid XP v7
Date: 27 Mar 2008 13:00:33
Message: <47ebe0c1$1@news.povray.org>
Darren New wrote:

> I thought it was pretty cool that the latest Erlang compilers will see 
> code like
> 
> map(F, [H|T]) -> [F(H)|map(F,T)];
> map(F, []) -> [].
> 
> and turn it into the same code you'd get with an auxiliary accumulator 
> and a call to "reverse" at the end.

Doesn't reverse require N operations? Wouldn't that mean that map now 
takes 2N operations instead of just N?

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.