4.17.11
3.10.1
2.4.2
1.3.1

_.plant(value)

Creates a clone of the chain sequence planting value as the wrapped value.

Since

3.2.0

Arguments

argument
value
type
*
description
The value to plant.

Returns

(array)

Example

function square(n) {
  return n * n;
}

var wrapped = _([1, 2]).map(square);
var other = wrapped.plant([3, 4]);

other.value();
// => [9, 16]

wrapped.value();
// => [1, 4]
function square(n) {
  return n * n;
}

var wrapped = _([1, 2]).map(square);
var other = wrapped.plant([3, 4]);

other.value();
// => [9, 16]

wrapped.value();
// => [1, 4]