Functional programming with Clojure
Offered By: University of Helsinki via Independent
Course Description
Overview
Functional programming is a programming paradigm where pure functions are the basic building blocks of programs. A pure function is like a function in the mathematical sense. The outputs of the function are fully determined by its inputs. The idea is that this restriction makes your programs easier to understand. This course shows how you can code meaningful programs with mainly pure functions. Pure functional programming differs from object-oriented programming in that e.g. it does not make use of variables or loops.
The course is an introduction to functional programming with a dynamically typed language Clojure. We start with an introduction to Clojure; its syntax and development environment. Clojure has a good selection of data structures and we cover most of them. We also go through the basics of recursion and higher-order functions. The course material is in English.
Clojure is a young Lispish functional programming language on the Java virtual machine (JVM) platform, suitable for small and large programs. Because it runs on the JVM, all Clojure programs can use all the standard and third-party Java libraries freely. It offers tools for many tasks that are harder with other languages and has a special focus on concurrent programming.
You should have basic programming skills. No prior experience with functional programming is required.
The course is based on previous courses given at Helsinki Metropolia University of Applied Sciences in 2012 and at University of Helsinki CS department in 2011, 2012 and 2013.
Syllabus
Get equipped in your fight against the dragons.
- Installing the developement environment
- Java
- Leiningen
- Editor
- Git
- How to submit answers to exercises
Get your survival skills up to shape.
- Structure of the exercise project
- Using the REPL
- Prefix syntax
- Defining functions
Get your horse!
- if and truthiness
- Everything is an expression and thus has a value
Learn the structural weaknesses of dragons.
- Local names
- Data structures
- Vectors
- Maps
- Sets
- Abstract sequences
- Mapping
- Filtering
Polish your boots and armour.
- Indentation
- Whitespace
- Idioms
Project: poker hand evaluator
Predicates- Functions as values
- Predicate functions
- Higher-order functions
- some
- every?
Down the rabbit hole.
- Recursion over sequences
- Recursion over numbers
- Nonlinear recursion
- Tree recursion
- Passing state
Calling tails.
- Iteration with tail recursion
- loop
- recur
One Function to rule them all, One Function to find them,
One Function to bring them all and in the darkness bind them
In the Land of Code where the Off-By-Ones lie.
- Accumulating recursion with reduce
- Variable arguments
A blog engine written in Clojure, studied.
SudokuTags
Related Courses
A Beginner’s Guide to VCS and GitPackt via FutureLearn AWS Developer Tools Deep Dive
A Cloud Guru Git Quick Start
A Cloud Guru Implementing Azure DevOps Development Processes
A Cloud Guru Infrastructure as Code on GCP with Deployment Manager
A Cloud Guru