N-Queens Combinatorial Problem - Polyglot FP for Fun and Profit – Haskell and Scala - Part 1
Published: Jul 04 2021
Description:
view
Slideshow:
view
All slides:
view
Download:
pdf
(for perfect image quality)
Speakerdeck:
slideshow
Slideshare:
slideshow
Scala code:
github repo
First see the problem solved using the List monad and a Scala for comprehension.
Then see the Scala program translated into Haskell, both using a do expressions and using a List comprehension.
Understand how the Scala for comprehension is desugared, and what role the withFilter function plays.
Also understand how the Haskell do expressions and List comprehension are desugared, and what role the guard function plays.
Errata: on slide 30, the resulting lists should be Haskell ones rather than Scala ones.