(connect-down-left {} 15 1)
-; => {1 {:connections {4 2}
- 4 {:connections {1 2}}}}
+; => {1 {:connections {4 2}}
+ 4 {:connections {1 2}}}
(connect-down-right {} 15 3)
; => {3 {:connections {10 6}}
diff --git a/content/cftbat/functional-programming.html b/content/cftbat/functional-programming.html index 19db1dd6..debb48c3 100644 --- a/content/cftbat/functional-programming.html +++ b/content/cftbat/functional-programming.html @@ -503,8 +503,8 @@
These functions each take the board’s max position and a board position and use a little triangle math to figure out which numbers to feed to connect
. For example, connect-down-left
will attempt to connect position 1 to position 4. In case you’re wondering why the functions connect-left
, connect-up-left
, and connect-up-right
aren’t defined, the reason is that the existing functions actually cover these cases. connect
returns a board with the mutual connection established; when 4 connects right to 6, 6 connects left to 4. Here are a couple of examples:
(connect-down-left {} 15 1)
-; => {1 {:connections {4 2}
- 4 {:connections {1 2}}}}
+; => {1 {:connections {4 2}}
+ 4 {:connections {1 2}}}
(connect-down-right {} 15 3)
; => {3 {:connections {10 6}}