As developers, we usually aim to solve problems by finding the simplest, most elegant solution. But what if we flipped that on its head?
What if, instead of simplifying, we intentionally made problems more complicated?
That’s the idea behind Complexify, a web application that takes a simple mathematical equation and transforms it into a more complex but equivalent version before evaluating the result. Think of it like an overly simplified version of hashing: start with something easy to understand, apply transformations, and end up with something that looks far more difficult to interpret, but still resolves to the same value.
Complexify is an interactive tool for exploring mathematical complexity:
2+2=4.It’s a playful way to turn straightforward math into something more challenging, while still maintaining correctness.
Complexify was built entirely with the F# ecosystem on top of Blazor WebAssembly:
The solution is organized into clear components, each handling a different responsibility:
Parser.fs: Parses mathematical expressions with FParsec, supporting operators like +, -, *, /, ^, =, log, and exp.Runner.fs: Evaluates parsed expressions and generates more complex equivalents.Main.fs: Implements Elmish’s model, update, and view logic.Startup.fs: Configures and starts the Blazor WebAssembly host.wwwroot/main.html: Provides the layout and UI bindings.Working on Complexify was one of the few times I’ve used F# alongside Bolero. The experience confirmed how powerful this combination is for building applications with complex logic and interactive UIs:
Overall, the project reinforced how much fun functional programming can be when paired with modern web frameworks.
Complexify started as a thought experiment, what happens if we try to make math more difficult instead of simpler?, and became a full-fledged project. It’s part puzzle, part playground, and part demonstration of how functional programming can model complexity with elegance.