Seems like you have found an interesting bug – Luna does not report division by 0 errors properly.
mappingFunction 50 tries to divide by zero. The problem is the order of arguments to
nextResiduum – the
fold method takes a function that takes first the list element and then current accumulator value and from the logic it seems you have mistakenly reversed the argument order.
So, first of all there’s a bug in your code, resulting in division by 0.
Second, there’s a bug in Luna Studio in that it failed silently instead of reporting it. Just opening an issue on github for this.