Skip to main content
Module

x/rambda/immutable.d.ts>last

Faster and smaller alternative to Ramda
Go to Latest
function last
import { last } from "https://deno.land/x/rambda@v7.0.1/immutable.d.ts";

It returns the last element of input, as the input can be either a string or an array.

Parameters

str: string

Returns

string

Parameters

emptyList: readonly []

Returns

undefined

Type Parameters

T extends any

Parameters

list: readonly T[]

Returns

T | undefined