It sounds like it's exceeding the stack size. Have you tried setting it to
unlimited? ulimit -s unlimited

http://www.mail-archive.com/picolisp@software-lab.de/msg01203.html

On Fri, Feb 10, 2017 at 8:07 AM, Christopher Howard <
christopher.how...@qlfiles.net> wrote:

> Hi list. When I try to do
>
> (apply '+ (range 1 1000000)
>
> I get segfault. I thought maybe this was some kind of internal
> limitation of the apply function, so I defined a foldl:
>
> (de foldl (Fn Acc Lst)
>     (if (== () Lst) Acc
>         (let Acc2 (Fn Acc (car Lst))
>              (foldl Fn Acc2 (cdr Lst)) ) ) )
>
> : (foldl '+ 0 (range 1 1000))
> (foldl '+ 0 (range 1 1000))
> -> 500500
> : (foldl '+ 0 (range 1 1000000))
> (foldl '+ 0 (range 1 1000000))
>
> ..and again, a segfault.
>
> Am I doing something wrong?
>
> --
> https://qlfiles.net
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>

Reply via email to