So, I was reading a bit about continuations the other day, and, since I&#39;ve been thinking about good ways of expressing chess strategies in Haskell, I thought that I&#39;d play around a bit with something like continuations for game-playing strategies. The idea is that you have combinators that allow you full access to the strategies which remain to be applied. In this way, strategies can &quot;activate&quot; and &quot;de-activate&quot; other strategies. Here&#39;s a simple little toy app for Tic-Tac-Toe (Naughts and Crosses):<br>
<br><a href="http://codepad.org/nN9JsxFK">http://codepad.org/nN9JsxFK</a><br><br>You can run main on &#39;example&#39;, and see that it searches every line and fails. And, as you can see, it aborts after finding a win in example2. This would be easily extensible to say things like &quot;if you&#39;ve seen a blocking move, and you don&#39;t have a win, then play the blocking move&quot;, and of course the other deep intricacies of the game.<br>
<br>My question is, is this, in fact, related to continuations somehow? Could continuations simplify it? Or am I doing something completely different?<br>