0.2.2 • Published 11 years ago

funkyjs v0.2.2

Weekly downloads
1
License
-
Repository
github
Last release
11 years ago

funkyjs - Functional JavaScript Build Status

Documentation

For now, look through the code.

Examples

var F = require('funkyjs');
var _ = require('underscore');

// funkyjs
var newList = F('map', F('range', 4), F('incr'));

// JavaScript + Underscore
var newList = _.map([0, 1, 2, 3], function(el) {
  return el += 1;
});

// funkyjs
var array = (
  F('sortBy',
    F('zip',
      F('shuffle', F('range', 62)),
      F('shuffle', F('range', 62))), F('sum-array')));

// JavaScript + Underscore
var array = (
  _.sortBy(
    _.zip(_.shuffle(_.range(62)), _.shuffle(_.range(62))),
    function() {
      return _.reduce(
        _.toArray(arguments),
        function(memo, el) {
          return memo + el;
        },
        0
      );
    }
  )
);

Even better...

# funkyjs + CoffeeScript
array = (
  (F 'sortBy',
    (F 'zip',
      (F 'shuffle', (F 'range', 62)),
      (F 'shuffle', (F 'range', 62))), (F 'sum-array')))

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using grunt.

License

Copyright (c) 2013 Vail Gold
Licensed under the MIT license.

0.2.2

11 years ago

0.2.1

11 years ago

0.2.0

11 years ago

0.1.1

11 years ago

0.1.0

11 years ago