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
Nice to meet you everyone! I came across the same problem. It seems that it is iterate that is not stack-safe.
An alternative, hand-made implementation of mine seems to work:
myIterate::foralla. (a->a) ->a->Lista
myIterate f x = List $ defer \_ ->Cons x (myIterate f (f x))
main = log <<< show <<< length <<< take 100000 <<< myIterate(_+1) $ 1-- prints 100000
Hello everyone! I have some experiments with lazy list. But I have some problem.
As u can see
iterate
has some strange behavior. I think this problem inmap
here https://github.com/purescript/purescript-lists/blob/master/src/Data/List/Lazy.purs#L189Or maybe I don't know how use lazy list in purescript. If it is, please help me =)
The text was updated successfully, but these errors were encountered: