Hi! Given a chess board position, I want to return all moves that have a distance of (x = 1 and y = 2) or (x = 2 and y = 1).
I have solved this in JavaScript, and I'm trying to implement it in Clojure, but my Clojure function just returns an empty list ()
. What am I missing?
Also, if you have any comments on readability or making the code more idiomatic, that's of course appreciated.
Here they are - first the JavaScript implementation, and then the Clojure one:
const originalBoard = [