10
1
mirror of https://gitlab.com/scemama/QCaml.git synced 2024-12-22 12:23:31 +01:00

Fix tailcall bug

This commit is contained in:
Anthony Scemama 2021-11-09 14:57:19 +01:00
parent 98ca250ed3
commit 5b22c9fabd

View File

@ -386,7 +386,8 @@ let rec to_list ?(accu=[]) = function
(trailing_zeros t + 1)::accu (trailing_zeros t + 1)::accu
in in
logand t @@ minus_one t 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 #+end_src
#+begin_src ocaml :tangle (eval test-ml) :exports none #+begin_src ocaml :tangle (eval test-ml) :exports none