(defn add-pos
"Pegs the position and performs connections"
diff --git a/content/cftbat/functional-programming.html b/content/cftbat/functional-programming.html index 19db1dd6..83dc1ae8 100644 --- a/content/cftbat/functional-programming.html +++ b/content/cftbat/functional-programming.html @@ -511,7 +511,7 @@
In the first example, connect-down-left
takes an empty board with a max position of 15 and returns a new board populated with the mutual connection between the 1 position and the position below and to the left of it. connect
-down-right
does something similar, returning a board populated with the mutual connection between 3 and the position below it and to its right.
In the first example, connect-down-left
takes an empty board with a max position of 15 and returns a new board populated with the mutual connection between the 1 position and the position below and to the left of it. connect-down-right
does something similar, returning a board populated with the mutual connection between 3 and the position below it and to its right.
The next function, add-pos
, is interesting because it actually reduces on a vector of functions, applying each in turn to build up the resulting board. But first it updates the board to indicate that a peg is in the given position:
(defn add-pos
"Pegs the position and performs connections"