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.49 multiple-value-call Special Operator

Syntax:
multiple-value-call function-form form*    {result}*

Arguments and Values:
function-form - a form; evaluated to produce function.

function - a function designator resulting from the evaluation of function-form.

form - a form.

results - the values returned by the function.

Description:
Applies function to a list of the objects collected from groups of multiple values2.

multiple-value-call first evaluates the function-form to obtain function, and then evaluates each form. All the values of each form are gathered together (not just one value from each) and given as arguments to the function.

Examples:
 (multiple-value-call #'list 1 '/ (values 2 3) '/ (values) '/ (floor 2.5))
 (1 / 2 3 / / 2 0.5)
 (+ (floor 5 3) (floor 19 4)) ==(+ 1 4)
 5
 (multiple-value-call #'+ (floor 5 3) (floor 19 4)) ==(+ 1 2 4 3)
 10

See Also:
multiple-value-list, multiple-value-bind

Allegro CL Implementation Details:
None.

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