Exercise 3.13
Exercise 3.13
B01 Introduction to Clojure
Buy now
Learn more
Day 1: Syntax and REPL
Read Eval Print Loop (REPL)
7
Baking cookies - Calling functions
1
Exercise 1.1 – baking a cake
4
Defining functions with defn
2
Exercise 1.2 – several `add-` functions
1
Refactoring bake-cookies
Exercise 1.3 – bake-cake
1
Conditional branching with cond
1
Exercise 1.4 – rewrite bake-cake
1
Exercise 1.5 – scooped?
Exercise 1.6 – squeezed?
Two-branch conditionals with if and do
Exercise 1.7 – add-scooped and add-squeezed
Some convenience functions – bowl-for and add
Looping a fixed number of times – dotimes
Exercise 1.8 – add- functions
Exercise 1.9 – rewrite bake-cake
Accepting varying numbers of arguments – variadic functions
2
Exercise 1.10 – rewrite add to be variadic
2
Exercise 1.11 – rewrite bake-cake
Exercise 1.12 – rewrite bake-cookies
3
Conclusion
Day 2: Data Structures and Editor
Introduction to Day 2
Moving between locations
2
Sets and defining variables
Exercise 2.1
Exercise 2.2
Exercise 2.3
Maps and looping over collections
1
Get morning orders
Defining local variables with let
1
Exercise 2.4
Functional programming and data-driven programming
Nesting loops with doseq
1
Fetching ingredients
2
Refactoring fetch-for-cake to use fetch-ingredients
Merging maps with merge-with
1
Exercise 2.7
Modifying the values of a map with update-vals
Defining inline anonymous functions with fn
Exercise 2.8
Exercise 2.9
Converting a sequence of values to another sequence with map
Summing up with reduce
Exercise 2.10
Exercise 2.11
Generating a sequence of numbers with range
Concatenating two lists together with cat
1
Exercise 2.12
Day 2 Conclusion
Day3: Data-Driven Programming
Introduction to Day 3
Exercise 3.1
1
Exercise 3.2
Exercise 3.3
Exercise 3.4
Creating our first recipe in the database
Exercise 3.5
Exercise 3.6
Exercise 3.7
Removing unused code
Exercise 3.8
Exercise 3.9
Exercise 3.10
1
Exercise 3.11
Exercise 3.12
2
Dispatching to the correct add function
Exercise 3.13
1
BONUS Reading and writing EDN
BONUS Making code read top to bottom with thread last
Conclusion
Preview unavailable
You must log in or sign up to view this lesson.
Login
Sign up
B01 Introduction to Clojure
Buy now
Learn more
Day 1: Syntax and REPL
Read Eval Print Loop (REPL)
7
Baking cookies - Calling functions
1
Exercise 1.1 – baking a cake
4
Defining functions with defn
2
Exercise 1.2 – several `add-` functions
1
Refactoring bake-cookies
Exercise 1.3 – bake-cake
1
Conditional branching with cond
1
Exercise 1.4 – rewrite bake-cake
1
Exercise 1.5 – scooped?
Exercise 1.6 – squeezed?
Two-branch conditionals with if and do
Exercise 1.7 – add-scooped and add-squeezed
Some convenience functions – bowl-for and add
Looping a fixed number of times – dotimes
Exercise 1.8 – add- functions
Exercise 1.9 – rewrite bake-cake
Accepting varying numbers of arguments – variadic functions
2
Exercise 1.10 – rewrite add to be variadic
2
Exercise 1.11 – rewrite bake-cake
Exercise 1.12 – rewrite bake-cookies
3
Conclusion
Day 2: Data Structures and Editor
Introduction to Day 2
Moving between locations
2
Sets and defining variables
Exercise 2.1
Exercise 2.2
Exercise 2.3
Maps and looping over collections
1
Get morning orders
Defining local variables with let
1
Exercise 2.4
Functional programming and data-driven programming
Nesting loops with doseq
1
Fetching ingredients
2
Refactoring fetch-for-cake to use fetch-ingredients
Merging maps with merge-with
1
Exercise 2.7
Modifying the values of a map with update-vals
Defining inline anonymous functions with fn
Exercise 2.8
Exercise 2.9
Converting a sequence of values to another sequence with map
Summing up with reduce
Exercise 2.10
Exercise 2.11
Generating a sequence of numbers with range
Concatenating two lists together with cat
1
Exercise 2.12
Day 2 Conclusion
Day3: Data-Driven Programming
Introduction to Day 3
Exercise 3.1
1
Exercise 3.2
Exercise 3.3
Exercise 3.4
Creating our first recipe in the database
Exercise 3.5
Exercise 3.6
Exercise 3.7
Removing unused code
Exercise 3.8
Exercise 3.9
Exercise 3.10
1
Exercise 3.11
Exercise 3.12
2
Dispatching to the correct add function
Exercise 3.13
1
BONUS Reading and writing EDN
BONUS Making code read top to bottom with thread last
Conclusion