Scala code for N-Queens Combinatorial Problem - Polyglot FP for Fun and Profit – Haskell and Scala - Part 3