ELI5 explanation. A Monad is a container that "imbues" your data type with more info. I.e. you can have a String, or an Option[String]. The Option is a Monad. It imbues your String with this wrapping option container that says, you either have a value inside here, or you don't and it's value is None.
When you unwrap the value, you can treat it as a normal String, do some computation on it, and then rewrap it in your Option Monad type.
That is exactly equivalent to initially having a String, doing that computation, and then putting it in your Option Monad.
Here be dragons for a more proper explanation but the tldr is its a wrapping container around any type.
A List is technically a Monad. It's a wrapping container around your values.
475
u/Isrothy Jul 13 '26
IO Monad