Lesson 10. Capstone: Functional object-oriented programming with robots!

This capstone covers

  • Using functional programming to create objects
  • Creating example objects that interact with each other
  • Representing state in a functional way

A common misconception is that object-oriented programming (OOP) and functional programming somehow stand in opposition. In reality, this couldn’t be further from the truth. Many functional programming languages support some form of object-oriented programming, including Common Lisp, R, F#, OCaml, and Scala. In this unit, you explored the idea that functions can be used to perform any computation. So it makes perfect sense that by using the tools of functional programming, you can create a basic object-oriented ...

Get Get Programming with Haskell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.