Just a list of Google search result for Haskell solutions of Eight Queens, annotated.
- Wikipedia – backtracking depth-first search, 11 lines including printing result
- literateprograms.org – 11 lines.
- c2 – two solutions 4 and 5 lines, using list comprehension or fold
- Haskell tutorial at Walla Walla University, wwc – 4 lines, list comprehension
- magnus blog – N-Queens solution, relatively long, code translated from Standard ML, uses exceptions. There is another solution (in comments), 147bytes long
- Memorial University – long solution Monadic that uses State Transformer
- Aarhus university – 6 lines including printing, list comprehensions.
- paulbutler.org – “N-Queens in a Tweet” – 160 bytes, including printing
- haskell.org – a thread comparing performance vs C language
- wikibooks.org – 6 lines, use fold (same as C2 solution)
- harold – 7 lines, uses map.
- All About Monads – Monadic Solution
- UNSW; a journal of Haskell programming – 12 lines, nice solution.
- Sententia firstname.lastname@example.org – 10 lines, using writer monad
- RAMONHASKELL - translation of C program that generates CNF clauses
Tags: Haskell EightQueens