Bridges to Functions: Imperative vs Kotlin FP
"Bridges to Functions" is a hands-on series for Kotlin developers who want to move from imperative patterns to functional thinking. Each post compares an imperative solution with a functional alternative, explains the ‘why’ through everyday analogies (recipes, conveyor belts, and blueprints), and introduces just-enough category theory (functors, monads, natural transformations) to make the abstractions meaningful. Expect concise Kotlin examples, visual pipelines, exercises, and practical patterns you can apply in production code.
Articles in this series
Tech Insights & Engineering Articles
Explore technical articles, software architecture deep dives, clean code tutorials, and computer science explorations from my journey.
Writer Monad — When Functions Need to Talk Without Breaking Purity
One of the first things you learn in functional programming is:
When Composition Breaks: Why We Need Kleisli Category
In the previous posts, we built something beautiful.
When Code Stops Mutating and Starts Composing - Understanding Monoids Through Real Kotlin Problems
Most bugs don’t come from complicated algorithms.
Monoid as a Category — When “Combining” Becomes “Moving”
Most developers first learn a monoid like this:
Monoids — The Rules Behind Safe Combination
Most bugs don’t come from computing a value.
Orders as Categories — Why Comparison Matters More Than Sorting
When we compare things in programming, we instinctively think about sorting:
From Nothing to Arrows: Objects and Simple Graphs
“Every complex system that works evolved from a simple system that worked.” — John Gall
Memoization: When Remembering Is Smarter Than Recomputing
At some point in every developer’s journey, you notice a familiar pain: the **same computation** is being done **again…*…
Types & Functions — The Real Building Blocks of Programs
Types tell you what something is. Functions tell you what it can do.