Strange behaviour with partial evaluation and sum() function

Hi all, I have encountered strange behaviour when using partial evaluation with the sum() function.

I get different answers with the same calculation.

Please see the attached screenshots to see what I mean.

This expression produces an incorrect result of 5.

Where this expression produces the correct result of 6.

Both expressions use the same sum(1, _)(2, 3) function.

Any ideas why the results are different?

 

Thanks,

Morné

  Discussion posts and replies are publicly visible