GENERIC-FUNCTION(3cl) |
Common Lisp Reference |
GENERIC-FUNCTION(3cl) |
NAME
generic-function – function whose behavior depends on classes or identities of supplied arguments (system class)
SYNOPSIS
Class precedence list: generic-function, function, t
;; n/a
|
ARGUMENTS and VALUES
(none)
VALID CONTEXT
n/a
BINDING TYPES AFFECTED
n/a
DESCRIPTION
A generic function is a function whose behavior depends on the classes or identities of the arguments supplied to it. A generic function object contains a set of methods, a lambda list, a method combination type, and other information. The methods define the class-specific behavior and operations of the generic function; a method is said to specialize a generic function. When invoked, a generic function executes a subset of its methods based on the classes or identities of its arguments.
A generic function can be used in the same ways that an ordinary function can be used; specifically, a generic function can be used as an argument to funcall and apply, and can be given a global or a local name.
AFFECTED BY
(none)
EXCEPTIONAL SITUATIONS
(none)
NOTES
(none)
EXAMPLES
(none)
SEE ALSO
(none)
AUTHOR and COPYRIGHT
Substantial portions of this page are taken from draft proposed American National Standard for Information Systems—Programming Language—Common Lisp, X3J13/94-101R, Version 15.17R, Fri 12-Aug-1994 6:35pm EDT; no copyright indicated.
Additional clarification and comments by Michael Marking <marking@tatanka.com>, http://www.tatanka.com/software/cl-manpages/; alternatively, https://github.com/wakinyantanka/cl-manpages/. Copyright 2017 Michael Marking as both an original and a derivative work.
Licensed under Creative Commons Attribution-NoDerivatives 4.0 International (CC BY-ND 4.0).
This page last revised Friday 31 March 2017.