code from my "Theory and Practice of Functional Reactive JavaScript" talk