Stack overflow exception when using pipes in tail-recursive function
问题 I have a naive implementation of a gameloop let gameLoop gamestate = let rec innerLoop prev gamestate = let now = getTicks() let delta = now - prev gamestate |> readInput delta |> update delta |> render delta |> innerLoop delta innerLoop 0L gamestate This implementation throws a stackoverflowexception. In my mind this should be tail recursive. I could make a work around like this let gameLoop gamestate = let rec innerLoop prev gamestate = let now = getTicks() let delta = now - prev let