On Fri, Apr 16, 2010 at 12:41 PM, Aravindh Johendran
wrote:
> Sorry, I shoulda been clearer. By similar functionality, i meant a 20-
> q game with
> 1) the network implemented as closures and
There are various ways you can do this while separating concerns. If
you don't mind specifying the quest
Sorry, I shoulda been clearer. By similar functionality, i meant a 20-
q game with
1) the network implemented as closures and
2) code that doesn't have to hold state in a global datastructure
The question wasn't about the easiest way to implement the game.
State is unavoidable in many circumstanc
What do you mean by "similar functionality"? Without using mutable
state, you won't be able to retain the defnode-style interface. But
obviously a twenty-questions program like this is easy to implement in
a purely functional way:
(defn ask [questions node]
(let [data (questions node)]
(asse