[erlang-questions] learning Erlang: factoring primes

Ludovic Coquelle lcoquelle@REDACTED
Fri May 4 11:03:37 CEST 2007

Kind of ... I'm not sure about stack-overflow, but yes idea is that: in your
code, Erlang needs as many function-call contexts as factors in the number.

In this case I guess this is not a very big number of contexts. But this
kind of consideration have to be made when programming in Erlang.

On 5/4/07, Martin Ankerl <martin.ankerl@REDACTED> wrote:
> On 5/4/07, Ludovic Coquelle <lcoquelle@REDACTED> wrote:
> > Not sure this is useful here, but fact could be made tail-recursive:
> Does that mean that my code could (at least theoretically) produce a
> stack overflow, and when tail-recursion is possible this is save?
> --
> Martin Ankerl | http://martin.ankerl.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20070504/5e2ad05c/attachment.htm>

More information about the erlang-questions mailing list