Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/rambda/mod.ts>prepend

Faster and smaller alternative to Ramda
Go to Latest
function prepend
import { prepend } from "https://deno.land/x/rambda@9.2.1/mod.ts";

It adds element x at the beginning of list.

Parameters

xToPrepend: T
iterable: T[]

Parameters

xToPrepend: T
iterable: IsFirstSubtypeOfSecond<T, U>[]

Parameters

xToPrepend: T

Returns

<U>(iterable: IsFirstSubtypeOfSecond<T, U>[]) => U[]

Parameters

xToPrepend: T

Returns

(iterable: T[]) => T[]