The use of Software Transactional Memory makes concurrent programming almost trivial. Here's an example of a FIFO queue that can be understood even if you don't know Haskell. I'll narrate the code...

@BartoszMilewski this is cool! However, I feel like any functional code that does anything useful (non leetcode basically) is monadic, which seems unfortunate for the functional idiom. Do you have any thoughts on this?

Also I only learned haskell a year ago, self taught, (mostly via your category theory videos which were awesome!) so I'm no expert in any of this :)

@ryan_ What's wrong with monadic code?
@BartoszMilewski I actually like the Koka style of everything-is-in-a-monad, though of course that's an effect system, not actually monads. I think logging and transactions (and security typing/information flow control, to add a more niche example) are important for anything nontrivial
@ryan_ I think of effect systems as essentially abstracting parts of a monad to a few Kleisli arrows, and then using a free monad to accumulate these effects.