Hey Chris!
Values for PlayerNumber are acquired at evaluation time, from the state of
the system.

I have not included the evaluation of AllPlayers.
Here how it looks:

evalObs AllPlayers  = return . pure  =<< gets players

But when you build your Obs, you have yet no idea how much players it will
be.
This is just symbolic at this stage.

To give you a better insight, here is want I want to do with Map:

everybodyVote :: Obs [Bool]
everybodyVote = Map (Vote (Konst "Please vote")) AllPlayers

In memory, everybodyVote is just a tree.
This rule can be executed latter whenever I want to perform this democratic
vote ;)

Hope this answer to your question.
Corentin


On Tue, Oct 26, 2010 at 7:17 PM, Christopher Done
<chrisd...@googlemail.com>wrote:

> On 26 October 2010 18:07, Dupont Corentin <corentin.dup...@gmail.com>
> wrote:
> > But how can I write the evaluator for Map?
>
> Where do values for PlayerNumber come from? Unless I'm mistaken, the
> only thing that Map can be used with is Obs [PlayerNumber], a list of
> values PlayerNumber which we have no means of acquiring in order to
> provide to the Map function.
>
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to