https://github.com/Gozala/reducers
Tip revision: 479f6dc8d5cb2cb01a2431482340d9b12f93a523 authored by Irakli Gozalishvili on 24 November 2012, 05:22:40 UTC
Merge pull request #25 from Gozala/future
Merge pull request #25 from Gozala/future
Tip revision: 479f6dc
into.js
"use strict";
var fold = require("./fold")
function into(source, buffer) {
/**
Adds items of given `reducible` into
given `array` or a new empty one if omitted.
**/
return fold(source, function foldInto(value, result) {
result.push(value)
return result
}, buffer || [])
}
module.exports = into