You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This one should be rather easy to fix it by yourself -- "git grep" would let you easily locate that example in the distribution. Would you be willing to give it a try?
Original bug ID: 7322
Reporter: junsli
Status: closed (set by @damiendoligez on 2016-09-27T14:26:48Z)
Resolution: fixed
Priority: normal
Severity: minor
Fixed in version: 4.04.0 +dev / +beta1 / +beta2
Category: documentation
Tags: junior_job
Monitored by: @gasche
Bug description
Call site of loop' seems incorrect.
let f x =
let rec loop' xs inv_0 inv_1 =
match xs with
| [] -> inv_0 + inv_1
| x::xs -> x + loop2' xs inv_0 inv_1
and loop2' ys inv_0 inv_1 =
match ys with
| [] -> 4
| y::ys -> y - loop' ys inv_0 inv_1
in
Printf.printf "%d\n" (loop' (x + 42) (x + 43) [1; 2; 3])
If this phase doesn't change the order of arguments, the call is supposed to be
loop' [1; 2; 3] (x + 42) (x + 43)
The text was updated successfully, but these errors were encountered: