Re: function that takes primitives?

2009-01-23 Thread Rich Hickey
the impression I can rewrite try_to_solve to use a loop/recur, and then can use primitives - but I can't see any way to make calls to step use primitives, short of inlining the function... Currently, there is no way to write a function that takes/returns primitives, all of the signatures are Object based

Re: function that takes primitives?

2009-01-23 Thread Albert Cardona
Currently, there is no way to write a function that takes/returns primitives, all of the signatures are Object based. And please keep them so! Turtles all the way down solves many, many problems. For performance, whoever in need, just cache the int/float/double/etc. values locally

Re: function that takes primitives?

2009-01-23 Thread Korny Sietsma
algorithms for the shiny new 80386 CPU! - Korny On Sat, Jan 24, 2009 at 8:04 AM, Albert Cardona sapri...@gmail.com wrote: Currently, there is no way to write a function that takes/returns primitives, all of the signatures are Object based. And please keep them so! Turtles all the way down

function that takes primitives?

2009-01-22 Thread Korny Sietsma
Hi folks, Is there any way to make a function that takes primitive parameters? It seems you can't, but I might be missing something. I have the following code (a start to playing with mandelbrot sets): (defn step [x0, y0, xn, yn] (let [xm (+(-(* xn xn)(* yn yn)) x0) ym (+(* 2 xn yn)