Skip to main content
Module

x/denofun/nth.ts>default

Small utility library containing functions, monads and other fun stuff.
Latest
function default
import { default } from "https://deno.land/x/denofun@v0.2.0/nth.ts";

nth returns element under given index, if negative index is provided element at (length + index) is returned

Parameters

i: number

index

xs: string | any[]

a list of elements or a string

Returns

string | any[]

an element or a character