ToC DocOverview CGDoc RelNotes Index PermutedIndex
Allegro CL
Home Previous Up Next Table of Contents Index
  ANSI Common Lisp   5 Data and Control Flow   5.3 Dictionary of Data and Control Flow

5.3.37 identity Function

identity object    object

Arguments and Values:
object - an object.

Returns its argument object.

 (identity 101)  101
 (mapcan #'identity (list (list 1 2 3) '(4 5 6)))  (1 2 3 4 5 6)

identity is intended for use with functions that require a function as an argument.

(eql x (identity x)) returns true for all possible values of x, but (eq x (identity x)) might return false when x is a number or character.

identity could be defined by

(defun identity (x) x)

Allegro CL Implementation Details:

Home Previous Up Next Table of Contents Index
© Franz Inc. All Rights Reserved - File last updated 2022-07-25