x = mouse_position.x y = mouse_position.y sum = x + y printf("(%d, %d); sum=%d", x, y, sum)
mousePosition :: Behavior (Int, Int) mouseClick :: Event ()
mapB :: (a -> b) -> Behavior a -> Behavior b
mapE :: (a -> b) -> Event a -> Event b
accum :: a -> Event (a -> a) -> Behavior a
例
clickCount :: Behavior Int <- accum 0 (mapE (\() acc -> acc + 1) mouseClick)
注文定義 注文243: 商品番号=0, 売り, 数量=3, 価格=233 ... キャンセル 注文番号=243
m = memoized $ ... statA = ... m ... statB = ... m ...