[Haskell-beginners] Knights exercies in <Learn your good haskell>

Haisheng Wu freizl at gmail.com
Fri Apr 6 18:53:27 CEST 2012


Hi there,

There is one trivial exercise in chapter 12 <List Monad> saying

1. As an exercise, you can change this function
   so that when you can reach one position from the other,
   it tells you which moves to take.
2.  how to modify this function so that
    we also pass it the number of moves to take instead of
    that number being hard-coded.

I have one answer (find the URL below) but I'm not happy with it.
https://github.com/freizl/dive-into-haskell/blob/master/monad/knight-queue.hs

Do you have better ideas?

thanks.

-Haisheng



More information about the Beginners mailing list