Write the signatures for these three world handlers: (1) tick consumes a WorldState and produces the next WorldState; (2) draw consumes a WorldState and produces an Image; (3) handle-key consumes a WorldState and a KeyEvent and produces a WorldState. Pay attention to the parameter order for the key handler.
Short answerAccepted answer
; WorldState -> WorldState
; WorldState -> Image
; WorldState KeyEvent -> WorldState