animate :: DOMNode -> VNode -> State -> IO ()
animate n r s =
  let s' = step s
      r' = render s'
      p  = diff r r'
--  in  s' `seq` redraw n p >> threadDelay 20000 >> animate n r' s' -- for async calculation, sync repaint
  in atAnimationFrame (patch n p >> animate n r' s')
animate :: DOMNode -> VNode -> State -> IO ()
animate n r s =
  let s' = step s
      r' = render s'
      p  = diff r r'
--  in  s' `seq` redraw n p >> threadDelay 20000 >> animate n r' s' -- for async calculation, sync repaint
  in atAnimationFrame (patch n p >> animate n r' s')
animate n r s =
  let s' = step s
      r' = render s'
      p  = diff r r'
--  in  s' `seq` redraw n p >> threadDelay 20000 >> animate n r' s' -- for async calculation, sync repaint
  in atAnimationFrame (patch n p >> animate n r' s')