@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">
13 lines (9 loc) • 304 B
Flow
// @flow
import {curry} from "flow-static-land/lib/Fun";
/**
* Returns a new Array with the given size (count) filled with the specified
* element.
*/
const repeat = <Element>(count: number, element: Element): Array<Element> =>
[...Array(count)].map(() => element);
export default curry(repeat);