FTYPE(3cl) |
Common Lisp Reference |
FTYPE(3cl) |
NAME
ftype – specify the type of a function (declaration)
SYNOPSIS
(
ftype
) |
ARGUMENTS and VALUES
—a function name
—a type specifier .
VALID CONTEXT
declaration or proclamation
BINDING TYPES AFFECTED
function
DESCRIPTION
Specifies that the functions named by function-names are of the functional type type. For example:
( declare ( ftype ( function ( integer list ) t ) )
( ftype ( function ( number ) float ) ))
If one of the functions mentioned has a lexically apparent local definition (as made by flet or labels), then the declaration applies to that local definition and not to the global function definition. ftype declarations never apply to variable bindings (see type).
The lexically apparent bindings of ftype declares the functional definition of each function name to be of a particular subtype of function, and macros do not denote functions.) s must not be macro definitions. (This is because
ftype declarations can be free declarations or bound declarations. ftype declarations of functions that appear before the body of a flet or labels form that defines that function are bound declarations. Such declarations in other contexts are free declarations.
AFFECTED BY
(none)
EXCEPTIONAL SITUATIONS
(none)
NOTES
(none)
EXAMPLES
(none)
SEE ALSO
declare(3cl), declaim(3cl), proclaim(3cl)
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 Sunday 26 February 2017.