Directing JavaScript With Arrows

Date Added: Mar 2010
Format: PDF

JavaScript programmers make extensive use of event-driven programming to help build responsive web applications. However, standard approaches to sequencing events are messy, and often lead to code that is difficult to understand and maintain. The authors have found that arrows, a generalization of monads, are an elegant solution to this problem. Arrows allows people to easily write asynchronous programs in small, modular units of code, and flexibly compose them in many different ways, while nicely abstracting the details of asynchronous program composition. In this paper, the authors present Arrowlets, a new JavaScript library that offers arrows to the everyday JavaScript programmer.