Currently Trampoline is defined in terms of Lazy which is memoized. Because of this Trampoline is also memoized. But there could also exist non memoized definition for Trampoline using just ((->) Unit) (Currently -> is not MonadRec, but will become once https://github.com/purescript/purescript-tailrec/pull/18 is merged). This implementation might be more efficient as it has no extra Lazy wrapper and memoization.
Currently
Trampoline
is defined in terms ofLazy
which is memoized. Because of thisTrampoline
is also memoized. But there could also exist non memoized definition forTrampoline
using just((->) Unit)
(Currently->
is notMonadRec
, but will become once https://github.com/purescript/purescript-tailrec/pull/18 is merged). This implementation might be more efficient as it has no extra Lazy wrapper and memoization.We have two options:
->
instead ofLazy
inTrampoline
->