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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.