{"size": 812, "ext": "js", "max_stars_repo_path": "src/chain.js", "max_stars_repo_name": "donnut/ramda", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/chain.js", "max_issues_repo_name": "donnut/ramda", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/chain.js", "max_forks_repo_name": "donnut/ramda", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 30.0740740741, "max_line_length": 78, "alphanum_fraction": 0.6293103448}
var _chain = require('./internal/_chain');
var _curry2 = require('./internal/_curry2');
var _dispatchable = require('./internal/_dispatchable');
var _xchain = require('./internal/_xchain');

/**
 * `chain` maps a function over a list and concatenates the results.
 * This implementation is compatible with the
 * Fantasy-land Chain spec, and will work with types that implement that spec.
 * `chain` is also known as `flatMap` in some libraries
 *
 * @func
 * @memberOf R
 * @category List
 * @sig (a -> [b]) -> [a] -> [b]
 * @param {Function} fn
 * @param {Array} list
 * @return {Array}
 * @example
 *
 *      var duplicate = function(n) {
 *        return [n, n];
 *      };
 *      R.chain(duplicate, [1, 2, 3]); //=> [1, 1, 2, 2, 3, 3]
 */
module.exports = _curry2(_dispatchable('chain', _xchain, _chain));
