@dillonkearns/elm-graphql
Version:
<img src="https://cdn.jsdelivr.net/gh/martimatix/logo-graphqelm/logo.svg" alt="dillonearns/elm-graphql logo" width="40%" align="right">
16 lines (12 loc) • 383 B
Flow
// @flow
import {curry} from "flow-static-land/lib/Fun";
/**
* Returns a new Array with the result of having removed the specified amount
* (count) of elements at the given index.
*/
const remove = <Element>(
index: number,
count: number,
array: Array<Element>
): Array<Element> => [...array.slice(0, index), ...array.slice(index + count)];
export default curry(remove);