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
Original bug ID: 419 Reporter: administrator Status: closed Resolution: not a bug Priority: normal Severity: minor Category: ~DO NOT USE (was: OCaml general)
Bug description
Hello!
I have a problem with following code:
let rec reverse_merge x =
match x with
| ([], [], out) -> out
| (h::t, [], out)
| ([], h::t, out) -> reverse_merge(t, [], h::out)
| (h1::t1, h2::t2, out) ->
if h1 > h2
then reverse_merge (t1, h2::t2, h1::out)
else reverse_merge (h1::t1, t2, h2::out)
;;
Original bug ID: 419
Reporter: administrator
Status: closed
Resolution: not a bug
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)
Bug description
Hello!
let rec reverse_merge x =
match x with
| ([], [], out) -> out
| (h::t, [], out)
| ([], h::t, out) -> reverse_merge(t, [], h::out)
| (h1::t1, h2::t2, out) ->
if h1 > h2
then reverse_merge (t1, h2::t2, h1::out)
else reverse_merge (h1::t1, t2, h2::out)
;;
let _ =
reverse_merge ([1; 5; 7; 20; 40; 67], [0; 4; 4; 77; 666], [])
;;
let rec reverse_merge x =
match x with
| ([], [], out) -> out
| (h::t, [], out) -> reverse_merge(t, [], h::out)
| ([], h::t, out) -> reverse_merge(t, [], h::out)
| (h1::t1, h2::t2, out) ->
if h1 > h2
then reverse_merge (t1, h2::t2, h1::out)
else reverse_merge (h1::t1, t2, h2::out)
;;
let _ =
reverse_merge ([1; 5; 7; 20; 40; 67], [0; 4; 4; 77; 666], [])
;;
PS. Objective Caml 3.01 at Black Cat Linux (2.2.11-4bc), installed from sources
distribution.
WBR, Ilya S Slyzhnyak. e-mail: ilya666@mail.kz icq: 33099817
The text was updated successfully, but these errors were encountered: