8-Queens in 8 Lines

Brushing up on “whiteboard coding” for internal interviews… Inspired by Hal Ableson’s streams-based solution to this old classic in the SICP lectures, here’s a pretty concise n-Queens solution:   let rec Solutions n board size = seq { // board is (x,y) tuple list of queens      let safe board (x,y) = // is particular…

1