N-Queens Combinatorial Problem - Polyglot FP for Fun and Profit – Haskell and Scala - Part 2
Published: Aug 01 2021
Description:
view
Slideshow:
view
All slides:
view
Download:
pdf
(for perfect image quality)
Speakerdeck:
slideshow
Slideshare:
slideshow
See how the guard function has migrated from MonadPlus to Alternative and learn something about the latter.
Learn how to write a Scala program that draws an N-Queens solution board using the Doodle graphics library.
See how to write the equivalent Haskell program using the Gloss graphics library.
Learn how to use Monoid and Foldable to compose images both in Haskell and in Scala.
Erratum on slide 22: the last line of the showQueens function should of course be show(solution).draw(frame) rather than show(solution).draw
Erratum on slide 43: it would be better if the definitions of the beside, above and on Monoids were also shown.