variadic concat. Close #18
This commit is contained in:
@@ -22,9 +22,9 @@
|
||||
(unless (and
|
||||
(hcl.startsWith "#")
|
||||
(= hcl.length 7)
|
||||
(apply = (.concat [true]
|
||||
(for c (.split (hcl.substr 1) "")
|
||||
(<= 0 (.indexOf (.split "0123456789abcdef" "") c))))))
|
||||
(apply = (concat [true]
|
||||
(for c (.split (hcl.substr 1) "")
|
||||
(<= 0 (.indexOf (.split "0123456789abcdef" "") c))))))
|
||||
(return false)))
|
||||
(let [ecl (dictGet pp "ecl")]
|
||||
(unless (<= 0 (.indexOf (.split "amb blu brn gry grn hzl oth" " ") ecl)) (return false)))
|
||||
|
@@ -1,7 +1,7 @@
|
||||
(defun path [:kiss.List<String> hillTile x0 y0 dx dy]
|
||||
(if (>= y0 .length hillTile)
|
||||
[]
|
||||
(.concat [(.charAt (nth hillTile y0) (Math.floor (% x0 .length (nth hillTile y0))))] (path hillTile (+ x0 dx) (+ y0 dy) dx dy))))
|
||||
(concat [(.charAt (nth hillTile y0) (Math.floor (% x0 .length (nth hillTile y0))))] (path hillTile (+ x0 dx) (+ y0 dy) dx dy))))
|
||||
|
||||
(defun pathString [:kiss.List<String> hillTile x0 y0 dx dy] (.join (path hillTile x0 y0 dx dy) ""))
|
||||
|
||||
|
Reference in New Issue
Block a user