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

x/rambda/rambda.js>prepend

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

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[]