Fix tailcall bug

This commit is contained in:
Anthony Scemama 2021-11-09 14:57:19 +01:00
parent 98ca250ed3
commit 5b22c9fabd
1 changed files with 2 additions and 1 deletions

View File

@ -386,7 +386,8 @@ let rec to_list ?(accu=[]) = function
(trailing_zeros t + 1)::accu
in
logand t @@ minus_one t
|> (to_list [@tailcall]) ~accu:newlist
|> to_list ~accu:newlist
(* |> (to_list [@tailcall]) ~accu:newlist tailcall does not work with 4.13*)
#+end_src
#+begin_src ocaml :tangle (eval test-ml) :exports none