"use strict"

var cwise = require("cwise")

var fill = cwise({
  args: ["index", "array", "scalar"],
  body: function(idx, out, f) {
    out = f.apply(undefined, idx)
  }
})

module.exports = function(array, f) {
  fill(array, f)
  return array
}
