Implementation of many algorithms in coffeescript