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 1 > (adjoin 2 (list 1 2 3))
it: (1 2 3)
user 2 > (adjoin 2 (list 1 3))
it: (2 1 3)
user 3 > (adjoin 2 (vector 1 3))
it: (2 1 3)