Zulip Chat Archive
Stream: general
Topic: Ref for tree pointers
Frederick Pu (Dec 18 2024 at 02:06):
So if i have trees A B
and a make a tree t := (mk val A B)
and i apply a function womp to t, and want to access the modified A value how would I do that. Would the approach to use ST.Ref and use monadic combinators to do mk val (Ref.mk A) (Ref.mk B)
somehow?
Matt Diamond (Dec 18 2024 at 02:44):
are you talking about docs#Tree or some other structure?
Frederick Pu (Dec 18 2024 at 03:14):
yes binary trees
Frederick Pu (Dec 18 2024 at 23:09):
also what's the difference between ST.Ref and IO.Ref
Last updated: May 02 2025 at 03:31 UTC