Event-driven programming in JavaScript often leads to code that is messy and hard to maintain. We have found arrows, a generalization of monads, to be an elegant solution to this problem. Our arrow-based Arrowlets library makes it easy to compose eventdriven programs in modular units of code. In particular, we show how to implement drag-and-drop modularly using arrows.
[ .pdf ]
@INPROCEEDINGS{khoo08jsarrows,
AUTHOR = {Yit Phang Khoo and Michael Hicks and Jeffrey S. Foster and Vibha Sazawal},
TITLE = {Directing JavaScript with Arrows (poster summary)},
BOOKTITLE = {Poster Proceedings of the {ACM} International Conference on Functional Programming (ICFP)},
MONTH = SEP,
YEAR = 2008
}