ensure-finalized-classGBBopen Toolsincf-afterensure-listGoTo Top

ensure-list   object => list[Function]

Purpose
Construct a list containing an object, if the object is not already a list.

Package   :gbbopen-tools

Module   :gbbopen-tools

Arguments and values

object     An object
list     A list

Returns
The object if it is a list or, if object is an atom, a newly consed list containing object as its sole element.

Examples

  > (ensure-list 'x)
  (x)
  > (ensure-list '(x))
  (x)
  > (ensure-list nil)
  nil
  >

Note
This function is compiled in-line for top performance.


The GBBopen Project


ensure-finalized-classGBBopen Toolsincf-afterensure-listGoTo Top