Arc Forumnew | comments | leaders | submitlogin
Bug: Infinite Loop
2 points by mdemare 6177 days ago | 1 comment
The following code recurses indefinitely:

    (rem '(1) [#t])
The second argument is not a list, so rem tries to coerce it into a list, but coerce just returns the lambda, and rem calls itself with the same arguments. Thank god for tail call optimalisation, or you'd have a stack overflow! ;-)


2 points by mdemare 6177 days ago | link

see also: http://arclanguage.org/item?id=368

-----