https://github.com/Gozala/reducers
Tip revision: b2e5e36a57c3d7e3043afe4ace945bbd936d0db1 authored by Irakli Gozalishvili on 02 November 2012, 23:49:32 UTC
Merge pull request #21 from Gozala/experiment/future
Merge pull request #21 from Gozala/experiment/future
Tip revision: b2e5e36
into.js
"use strict";
var reduce = require("./reduce")
function into(source, buffer) {
/**
Adds items of given `reducible` into
given `array` or a new empty one if omitted.
**/
return reduce(source, function reduceInto(result, value) {
result.push(value)
return result
}, buffer || [])
}
module.exports = into