Name

adjoin

Usage

builtin-function

Syntax

(adjoin item seq)

Description

Returns seq if seq contains item, otherwise returns a new list with item as its new (first or last) element.

user > (adjoin 2 (list 1 2 3))
it: (1 2 3)
user > (adjoin 2 (list 1 3))
it: (2 1 3)
user > (adjoin 2 (vector 1 3))
it: (2 1 3)