Skip to content

Latest commit

 

History

History
23 lines (11 loc) · 754 Bytes

File metadata and controls

23 lines (11 loc) · 754 Bytes

Functions

Functions are the parts of your code that do something. Your functions are where you define the behaviour of your application.

You have already met some functions: count, conj, first, rest

Maths operators are functions too: * +, -, *, /

We can write our own functions too.

Affect behaviour with arguments

Arguments are values given to a function that could change the result of calling the function.

Functions return a value

A Function always returns a value, even if that value is nil.

Always returning a value makes it easy for Clojure to use functions as an argument to another function.