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
This is an incomplete list of functions that could blow the stack. At some point we should do a more thorough audit, but I thought for now I'd at least keep track as I come across things.
This one is outside of the scope of Relude itself (as it's defined in Bastet, or possibly even in the OCaml standard library... not sure), but List.fold_right doesn't appear to be stack-safe (which I think is pretty normal for a foldr implementation), but it's used as the foundation for things like traverse and sequence which maybe makes those functions also not stack safe.
IIRC, PureScript ended up changing to a tail-recursive implementation of foldr, so we could start by digging in there.
This is an incomplete list of functions that could blow the stack. At some point we should do a more thorough audit, but I thought for now I'd at least keep track as I come across things.
Tree.flatten
(see Rewrite Flatten to be stack safe #246)Tree.fill
Tree.map
Tree.apply
Tree.bind
Tree.zipWith
Int.rangeAsList
andInt.rangeAsArray
List.flatten
List.init
List.chunk
Array.takeWhile
Array.chunk
SequenceZipper.findLeftBy
SequenceZipper.findRightBy
The text was updated successfully, but these errors were encountered: