Exemplo n.º 1
0
 /// <summary>
 /// Ball inbox
 /// This is the entry point for messages sent to a ball.  It looks for the message-type
 /// in the message-map; if found it invokes the message-inbox with the message and state.
 /// </summary>
 public static BallState Inbox(BallState state, BallMsg msg) =>
     match(messageMap, msg.Tag, 
         Some: fn => fn(msg)(state), 
         None: () => state
         );
Exemplo n.º 2
0
 /// <summary>
 /// Ball inbox
 /// This is the entry point for messages sent to a ball.  It looks for the message-type
 /// in the message-map; if found it invokes the message-inbox with the message and state.
 /// </summary>
 public static BallState Inbox(BallState state, BallMsg msg) =>
 match(messageMap, msg.Tag,
       Some: fn => fn(msg)(state),
       None: () => state
       );