Exploring Functional Programming Through Games

Short Form


How do you decide whether a new programming paradigm is worth learning or not? I ask myself a simple question: can I use it to make games in a simple way? Learning by playing is super fun. Allow me to take you on a thrilling journey to explore functional programming through JavaScript games. Let us dive deep into functional features that will help us approach complex problems from new directions and write bulletproof code.


The first section of this talk will introduce functional programming, it’s relation to lambda calculus, and why the paradigm is useful. I will then walk you through how to make a shoot ’em up game from scratch by following the Model-Update-View architecture borrowed from the Elm language, a pure functional language for the browser.


Model: every entity in the game needs some data to define where it is and what it is doing. How can we do this using functional constructs?

Update: what are pure functions and immutability and how can we use them to update the game model?

View: I’ll demo the game.


You’ll come away from this talk with a deeper appreciation of the simplicity, the elegance, and the scalability that functional programming can provide. Perhaps it can inspire you to take the leap and immerse yourself in the sublime beauty of the functional world.


functional programming, immutability, games, beginners, learning, languages, html5 canvas

Speaking experience

I gave this talk at FullStack JS in London, England. You can find the talk on https://github.com/Khaleed/talks/tree/master/fullstackjs. To access the presentation, please open index.html from the terminal. I've also given this same talk at the Recurse Center in New York City.


  • Hacker

    Khalid A

    Recurse Center (Alumni)


    Khalid is a programmer/entrepreneur that is based in London, England. Khalid loves to experiment and dive deep into game development, data visualisation, and functional programming. When not programming, Khalid loves to live abroad at least once every two years, social tech, and personal fitness training. He never graduated from the Recurse Center on December ’15.

Leave a private comment to organizers about this proposal