The parameterized-function Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The parameterized-function Reference Manual

This is the parameterized-function Reference Manual, generated automatically by Declt version 2.3 "Robert April" on Tue Feb 20 09:09:00 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

                        PARAMETERIZED-FUNCTION
                        ======================

                           By Robert Smith

This package provides functions which can be parameterized, whose
parameters are dispatched at compile time.

Parameterized functions are defined by first declaring the "dispatch
function". For example, if we wanted a general multiply function that
gets dispatched at compile time, we might declare the following:

  (define-dispatch-function mult (xtype ytype) (x y))

Next, we can define several parameterized functions.

  (define-parameterized-function mult (:integer :integer) (x y)
    (* x y))

  (define-parameterized-function mult (:integer :string) (x y)
    (with-output-to-string (s)
      (loop :repeat x
            :do (write-string y s))))

  (define-parameterized-function mult (:string :integer) (y x)
    (with-output-to-string (s)
      (loop :repeat x
            :do (write-string y s))))

  (define-parameterized-function mult (:string :string) (x y)
    (concatenate 'string x y)))

If we call MULT with a constant (quoted) list as the first argument,
then it will be expanded, at compile time, to one of the above
definitions. If the first argument is not constant, then dispatch will
occur at runtime.

Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 parameterized-function

Author

Robert Smith <quad@symbo1ics.com>

License

BSD 3-clause (See LICENSE)

Description

Compile-time parameterized functions.

Dependency

interface

Source

parameterized-function.asd (file)

Components

Next: , Previous: , Up: Top   [Contents][Index]

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Next: , Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.1 parameterized-function.asd

Location

parameterized-function.asd

Systems

parameterized-function (system)


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.2 parameterized-function/package.lisp

Dependency

license (file)

Parent

parameterized-function (system)

Location

package.lisp

Packages

parameterized-function


Previous: , Up: Lisp files   [Contents][Index]

3.1.3 parameterized-function/parameterized-function.lisp

Dependency

package.lisp (file)

Parent

parameterized-function (system)

Location

parameterized-function.lisp

Exported Definitions
Internal Definitions

Previous: , Up: Files   [Contents][Index]

3.2 Other


Previous: , Up: Other files   [Contents][Index]

3.2.1 parameterized-function/LICENSE

Parent

parameterized-function (system)

Location

LICENSE


Next: , Previous: , Up: Top   [Contents][Index]

4 Packages

Packages are listed by definition order.


Previous: , Up: Packages   [Contents][Index]

4.1 parameterized-function

Source

package.lisp (file)

Use List

common-lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.1 Special variables

Special Variable: *warn-about-dynamic-dispatch*

Enables run-time warnings when dynamic dispatch occurs.

Package

parameterized-function

Source

parameterized-function.lisp (file)

Special Variable: *warn-about-non-constant-parameters*

Enables compile-time warnings when dynamic dispatch will occur because of non-constant parameters.

Package

parameterized-function

Source

parameterized-function.lisp (file)


Previous: , Up: Exported definitions   [Contents][Index]

5.1.2 Macros

Macro: define-dispatch-function NAME (&rest PARAMETERS) (&rest ARGS) &key DOCUMENTATION
Package

parameterized-function

Source

parameterized-function.lisp (file)

Macro: define-parameterized-function NAME (&rest PARAMETERS) (&rest ARGS) &body BODY

Define a parameterized function named NAME whose parameter variables are PARAMETERS, whose lambda list is ARGS, and body is BODY.

Package

parameterized-function

Source

parameterized-function.lisp (file)


Previous: , Up: Definitions   [Contents][Index]

5.2 Internal definitions


Previous: , Up: Internal definitions   [Contents][Index]

5.2.1 Functions

Function: constant-quoted-list-p L &optional ENV
Package

parameterized-function

Source

parameterized-function.lisp (file)

Function: dispatch-table-name NAME
Package

parameterized-function

Source

parameterized-function.lisp (file)

Function: generate-name-from-parameters FN PARAMS &optional SUFFIX
Package

parameterized-function

Source

parameterized-function.lisp (file)

Function: undispatch-form FORM NEW-FUNCTION-NAME
Package

parameterized-function

Source

parameterized-function.lisp (file)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   F   L   O   P  
Index Entry  Section

F
File, Lisp, parameterized-function.asd: The parameterized-function<dot>asd file
File, Lisp, parameterized-function/package.lisp: The parameterized-function/package<dot>lisp file
File, Lisp, parameterized-function/parameterized-function.lisp: The parameterized-function/parameterized-function<dot>lisp file
File, other, parameterized-function/LICENSE: The parameterized-function/license file

L
Lisp File, parameterized-function.asd: The parameterized-function<dot>asd file
Lisp File, parameterized-function/package.lisp: The parameterized-function/package<dot>lisp file
Lisp File, parameterized-function/parameterized-function.lisp: The parameterized-function/parameterized-function<dot>lisp file

O
Other File, parameterized-function/LICENSE: The parameterized-function/license file

P
parameterized-function.asd: The parameterized-function<dot>asd file
parameterized-function/LICENSE: The parameterized-function/license file
parameterized-function/package.lisp: The parameterized-function/package<dot>lisp file
parameterized-function/parameterized-function.lisp: The parameterized-function/parameterized-function<dot>lisp file

Jump to:   F   L   O   P  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   C   D   F   G   M   U  
Index Entry  Section

C
constant-quoted-list-p: Internal functions

D
define-dispatch-function: Exported macros
define-parameterized-function: Exported macros
dispatch-table-name: Internal functions

F
Function, constant-quoted-list-p: Internal functions
Function, dispatch-table-name: Internal functions
Function, generate-name-from-parameters: Internal functions
Function, undispatch-form: Internal functions

G
generate-name-from-parameters: Internal functions

M
Macro, define-dispatch-function: Exported macros
Macro, define-parameterized-function: Exported macros

U
undispatch-form: Internal functions

Jump to:   C   D   F   G   M   U  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   *  
S  
Index Entry  Section

*
*warn-about-dynamic-dispatch*: Exported special variables
*warn-about-non-constant-parameters*: Exported special variables

S
Special Variable, *warn-about-dynamic-dispatch*: Exported special variables
Special Variable, *warn-about-non-constant-parameters*: Exported special variables

Jump to:   *  
S  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   P   S  
Index Entry  Section

P
Package, parameterized-function: The parameterized-function package
parameterized-function: The parameterized-function system
parameterized-function: The parameterized-function package

S
System, parameterized-function: The parameterized-function system

Jump to:   P   S