I had a similar experience. It tends to happen if you allocate to much at
once. Should be around 16 Megabyte in this case which normally is no
If you have such a long list and want to apply functions to it I would use
They are less ram intensive.
You do things wrong.
For example you still forget to close you parathesis. This will leave us in
a unresolved tension all day. Obligatory XKCD: https://xkcd.com/859/
Am 10.02.2017 14:15 schrieb "Christopher Howard" <
> 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?
> UNSUBSCRIBE: mailto:email@example.com?subject=Unsubscribe