How can we integrate interaction into a purely declarative language? T
his tutorial describes a solution to this problem based on a monad. Th
e solution has been implemented in the functional language Haskell and
the declarative language Escher. Comparisons are given with other app
roaches to interaction based on synchronous streams, continuations, li
near logic, and side effects.