> For AI agents: the complete documentation index is available at https://massaman.dev/llms.txt, the full documentation bundle is available at https://massaman.dev/llms-full.txt.

# Functional


[addCreates a function that adds a number to its input.](/reference/fp/add)[atCreates a function that returns the values at the given indices.](/reference/fp/at)[cartesianProductCreates a function that computes the Cartesian product with the piped array.](/reference/fp/cartesianProduct)[chunkCreates a function that splits an array into sub-arrays of a given length.](/reference/fp/chunk)[chunkByCreates a function that splits adjacent values whenever a key changes.](/reference/fp/chunkBy)[combinationsCreates a function that returns combinations of a given size.](/reference/fp/combinations)[compactCreates a function that removes falsey values from an array.](/reference/fp/compact)[countByCreates a function that counts values by a key.](/reference/fp/countBy)[differenceCreates a function that excludes values found in another array.](/reference/fp/difference)[differenceByCreates a function that excludes values by a mapped key.](/reference/fp/differenceBy)[differenceWithCreates a function that excludes values using a custom equality function.](/reference/fp/differenceWith)[dropCreates a function that drops values from the beginning of an array.](/reference/fp/drop)[dropRightCreates a function that drops values from the end of an array.](/reference/fp/dropRight)[dropRightWhileCreates a function that drops trailing values while a predicate passes.](/reference/fp/dropRightWhile)[dropWhileCreates a function that drops leading values while a predicate passes.](/reference/fp/dropWhile)[filterCreates a function that keeps only the elements that pass a test, equivalent to Array.prototype.filter.](/reference/fp/filter)[findCreates a function that returns the first value that passes a test.](/reference/fp/find)[findIndexCreates a function that returns the index of the first value that passes a test.](/reference/fp/findIndex)[findLastCreates a function that returns the last value that passes a test.](/reference/fp/findLast)[findLastIndexCreates a function that returns the index of the last value that passes a test.](/reference/fp/findLastIndex)[flatMapCreates a function that maps each value to an array and flattens the result by one level.](/reference/fp/flatMap)[flatMapDeepCreates a function that maps each value and deeply flattens the result.](/reference/fp/flatMapDeep)[flattenCreates a function that flattens nested arrays to a given depth.](/reference/fp/flatten)[flattenDeepCreates a function that recursively flattens nested arrays.](/reference/fp/flattenDeep)[flowPerforms left-to-right function composition, returning a reusable function instead of running immediately.](/reference/fp/flow)[forEachCreates a function that runs a callback for each value and returns the input array.](/reference/fp/forEach)[groupByCreates a function that groups values by a key.](/reference/fp/groupBy)[headCreates a function that returns the first value of an array.](/reference/fp/head)[initialCreates a function that returns all values except the last one.](/reference/fp/initial)[intersectionCreates a function that keeps values found in another array.](/reference/fp/intersection)[intersectionByCreates a function that keeps values by a mapped key.](/reference/fp/intersectionBy)[intersectionWithCreates a function that keeps values using a custom equality function.](/reference/fp/intersectionWith)[isSubsetCreates a function that checks whether the piped array is a subset of another array.](/reference/fp/isSubset)[isSubsetWithCreates a function that checks subset membership using a custom equality function.](/reference/fp/isSubsetWith)[joinCreates a function that joins array values into a string.](/reference/fp/join)[keyByCreates a function that builds an object keyed by each value.](/reference/fp/keyBy)[lastCreates a function that returns the last value of an array.](/reference/fp/last)[lengthCreates a function that returns the length of an array.](/reference/fp/length)[mapCreates a function that transforms every element of an array, equivalent to Array.prototype.map.](/reference/fp/map)[maxByCreates a function that returns the value with the largest computed score.](/reference/fp/maxBy)[minByCreates a function that returns the value with the smallest computed score.](/reference/fp/minBy)[multiplyCreates a function that multiplies its input by a number.](/reference/fp/multiply)[omitCreates a function that removes the given keys from an object.](/reference/fp/omit)[orderByCreates a function that sorts objects by criteria and sort orders.](/reference/fp/orderBy)[partitionCreates a function that splits values into passing and failing groups.](/reference/fp/partition)[pickCreates a function that keeps only the given keys of an object.](/reference/fp/pick)[pipePerforms left-to-right function composition, threading a value through a sequence of functions.](/reference/fp/pipe)[reverseCreates a function that returns a reversed copy of an array.](/reference/fp/reverse)[sampleCreates a function that returns a random value from an array.](/reference/fp/sample)[sampleSizeCreates a function that returns random values from an array.](/reference/fp/sampleSize)[shuffleCreates a function that returns a shuffled copy of an array.](/reference/fp/shuffle)[sortByCreates a function that sorts an array of objects in ascending order by one or more criteria.](/reference/fp/sortBy)[tailCreates a function that returns all values except the first one.](/reference/fp/tail)[takeCreates a function that returns the first count elements of an array.](/reference/fp/take)[takeRightCreates a function that returns values from the end of an array.](/reference/fp/takeRight)[takeRightWhileCreates a function that takes trailing values while a predicate passes.](/reference/fp/takeRightWhile)[takeWhileCreates a function that takes leading values while a predicate passes.](/reference/fp/takeWhile)[toFilledCreates a function that returns a filled copy of an array.](/reference/fp/toFilled)[unionCreates a function that combines two arrays without duplicate values.](/reference/fp/union)[unionByCreates a function that combines arrays by a mapped key without duplicates.](/reference/fp/unionBy)[unionWithCreates a function that combines arrays using a custom equality function.](/reference/fp/unionWith)[uniqCreates a function that removes duplicate values from an array.](/reference/fp/uniq)[uniqByCreates a function that removes duplicates by a mapped key.](/reference/fp/uniqBy)[uniqWithCreates a function that removes duplicates using a custom equality function.](/reference/fp/uniqWith)[unzipCreates a function that regroups zipped arrays by position.](/reference/fp/unzip)[unzipWithCreates a function that regroups zipped arrays and combines each position.](/reference/fp/unzipWith)[windowedCreates a function that returns sliding windows from an array.](/reference/fp/windowed)[withoutCreates a function that removes specific values from an array.](/reference/fp/without)[xorCreates a function that returns values that appear in exactly one of two arrays.](/reference/fp/xor)[xorByCreates a function that returns the symmetric difference by a mapped key.](/reference/fp/xorBy)[xorWithCreates a function that returns the symmetric difference using a custom equality function.](/reference/fp/xorWith)[zipCreates a function that groups values from arrays by index.](/reference/fp/zip)[zipObjectCreates a function that builds an object from keys and values.](/reference/fp/zipObject)[zipWithCreates a function that combines values from arrays by index.](/reference/fp/zipWith)