Ruby extensions for programming in functional style