/** @module array/head.ts */ import { BasicTypes, Head, IsArray, Literal, ValueAt, WidenType } from '../helper-types' export function head( arr: A ): Head /** * Return first item in array * * @param arr array to take first element of * @sig a[] -> a * @example * head( [ 1, 2, 3 ] ) // 1 : number * */ export function head( arr ) { return arr[ 0 ] } export default head