Introduction to Functional Programming with Clojure

Functional programming has many advantages. For starters:

  • Pure functions have no dependence on context, so they are easy to write, easy to test, easy to read. Most importantly, they are easy to combine.
  • Referential transparency makes substitution, caching, and lazy evaluation possible -- and simple.
  • Careful abstraction makes functions broadly reusable, in contrast with OO 'concretion' which aspires to encapsulation but mostly just protects your data from being reused.

To take full advantage of FP you have to think differently. In this session, you will learn how to reap the benefits above, by:

  • Programming with immutable values
  • Sharing data between persistent data structures
  • Recursing instead of looping
  • Using map, reduce, and into
  • Composing functions from the sequence library
  • Paying as you go with lazy data structures

Examples will be in Clojure, and will include a set of hands-on exercises to take home.


About Stuart Halloway

Stuart Halloway

Stuart Halloway is the CEO of Relevance, Inc. (www.thinkrelevance.com). With co-founder Justin Gehtland, Stuart helps companies adopt agile, as well as innovative technologies such as Clojure and Ruby on Rails. Stuart is the author of Programming Clojure, Rails for Java Developers, and Component Development for the Java Platform. Prior to founding Relevance, Stuart was the Chief Architect at Near-Time, and the Chief Technical Officer at DevelopMentor.

More About Stuart »