algorithm / adt templates for JavaScript