Recursion pitfalls in IO monads and how to avoid them

preview_player
Показать описание
Back after a sick break :) in this video, I'm talking about traps you can easily fall into when using any IO/Task effect/monad (or any monad, for that matter), and how to avoid them.

Read the code:

0:00 - Introduction, overview
0:17 - OutOfMemoryError - example, explanation
6:56 - OOM - solutions
9:23 - StackOverflowError - example, explanation
13:01 - SOE - solutions
15:06 - Summary, parting words

Find out more:
Рекомендации по теме
Комментарии
Автор

Hi Jakub, thank you for your content!
I have question regarding the *> and >> operators: I understand the semantic difference, but often I am not sure which one to use. Especially in non-recursive scenarios (which are most of course), which of them is your goto operator? In what situation would *> be preferred?

georgp.
Автор

Good to know, thanks. Usually, when describing recursion people advice always to stick to tail recursion because of stackoverflow issues, unless you're utilizing technics like trampolining (or use libs which utilize those technics).

mbesida