A story about safe and compositional resource management in vanilla Scala and cats-effect. — We’re all using resources on a daily basis. You turn on the water tap, wash your hands for at least 20–30 seconds, and turn it off. You switch the light on if it’s dark, and off when you no longer need it. Resources have a lifecycle. You open them, use…