The lambda-fiddle Reference Manual

Table of Contents

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

The lambda-fiddle Reference Manual

This is the lambda-fiddle Reference Manual, version 1.0.0, generated automatically by Declt version 2.3 "Robert April" on Tue Feb 20 08:53:39 2018 GMT+0.


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

1 Introduction

About Lambda-Fiddle

Lambda-fiddle is a collection of utilities to process lambda-lists. Mostly useful in contexts where you want a macro that uses lambda-lists in some fashion but need more precise processing.

How To

Included are --for each standard lambda-list part-- a remove-*-part and *-lambda-var/s function that remove the specified part or extract the associated variable/s, respectively. These are all based on the more generale collect-for-keyword and exclude-for-keyword functions that will scan the given lambda-list for the keyword and collect accordingly. The generalised functions may also be useful if you plan to include your own non-standard keywords.

(lambda-fiddle:remove-aux-part '(foo bar &key baz &aux (something else) altogether))
(lambda-fiddle:aux-lambda-vars '(foo bar &key baz &aux (something else) altogether))

Additionally, there is split-lambda-list and its macro partner with-destructured-lambda-list that split the lambda-list into all its parts and return/bind them accordingly, allowing for easy access.

(lambda-fiddle:split-lambda-list '(&whole wide world &key roles))
(lambda-fiddle:with-destructured-lambda-list (:required req) '(foo bar &optional baz)
  req)

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 lambda-fiddle

Maintainer

Nicolas Hafner <shinmera@tymoon.eu>

Author

Nicolas Hafner <shinmera@tymoon.eu>

Home Page

https://github.com/Shinmera/lambda-fiddle

License

Artistic

Description

A collection of functions to process lambda-lists.

Version

1.0.0

Source

lambda-fiddle.asd (file)

Component

lambda-fiddle.lisp (file)


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

3 Files

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


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

3.1 Lisp


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

3.1.1 lambda-fiddle.asd

Location

lambda-fiddle.asd

Systems

lambda-fiddle (system)


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

3.1.2 lambda-fiddle/lambda-fiddle.lisp

Parent

lambda-fiddle (system)

Location

lambda-fiddle.lisp

Packages

lambda-fiddle

Exported Definitions
Internal Definitions

flatten! (function)


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

4 Packages

Packages are listed by definition order.


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

4.1 lambda-fiddle

Source

lambda-fiddle.lisp (file)

Nickname

org.shirakumo.lambda-fiddle

Use List

common-lisp

Exported Definitions
Internal Definitions

flatten! (function)


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: *lambda-keywords*

List of all standard lambda-keywords.

Package

lambda-fiddle

Source

lambda-fiddle.lisp (file)

Special Variable: *single-argument-keywords*

List of all standard lambda-keywords that only allow one argument.

Package

lambda-fiddle

Source

lambda-fiddle.lisp (file)


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

5.1.2 Macros

Macro: with-destructured-lambda-list (&rest PARTS &key WHOLE ENVIRONMENT REQUIRED OPTIONAL REST BODY KEY AUX &allow-other-keys) EXPRESSION &body FORMS

Destructures the given EXPRESSION into its lambda-list parts.

Package

lambda-fiddle

Source

lambda-fiddle.lisp (file)


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

5.1.3 Functions

Function: aux-lambda-vars LAMBDA-LIST

Returns all auxiliary variables of the ordinary-lambda-list.

Package

lambda-fiddle

Source

lambda-fiddle.lisp (file)

Function: body-lambda-var LAMBDA-LIST

Returns the body variable of the ordinary-lambda-list.

Package

lambda-fiddle

Source

lambda-fiddle.lisp (file)

Function: collect-for-keyword KEYWORD LAMBDA-LIST &key SPANNING

Returns a fresh list of elements listed after the KEYWORD in the lambda-list.
If SPANNING is T, it includes everything up until the next keyword, otherwise only one token each.

Package

lambda-fiddle

Source

lambda-fiddle.lisp (file)

Function: construct-lambda-list &key WHOLE ENVIRONMENT REQUIRED OPTIONAL REST BODY KEY ALLOW-OTHER-KEYS AUX

Construct a lambda-list out of the given parts.

Package

lambda-fiddle

Source

lambda-fiddle.lisp (file)

Function: environment-lambda-var LAMBDA-LIST

Returns the environment variable of the lambda-list

Package

lambda-fiddle

Source

lambda-fiddle.lisp (file)

Function: exclude-for-keyword KEYWORD LAMBDA-LIST &key SPANNING

Returns a fresh lambda-list but without the parts identified by KEYWORD.
If SPANNING is T, it excludes everything up until the next keyword, otherwise only one token each.

Package

lambda-fiddle

Source

lambda-fiddle.lisp (file)

Function: extract-all-lambda-vars LAMBDA-LIST

Extracts all variable bindings from the lambda-list, including the present-p ones.

Package

lambda-fiddle

Source

lambda-fiddle.lisp (file)

Function: extract-lambda-vars LAMBDA-LIST

Extracts the symbols that name the variables in the lambda-list.

Package

lambda-fiddle

Source

lambda-fiddle.lisp (file)

Function: flatten-lambda-list LAMBDA-LIST

Flattens the lambda-list by replacing all lists within it with their respective first symbol. This also properly flattens inner lambda-lists of macro-lambda-lists.

Package

lambda-fiddle

Source

lambda-fiddle.lisp (file)

Function: flatten-method-lambda-list LAMBDA-LIST

Flattens the lambda-list by replacing all lists within it with their respective first symbol. Unlike FLATTEN-LAMBDA-LIST, this works for method lambda lists.

Package

lambda-fiddle

Source

lambda-fiddle.lisp (file)

Function: key-lambda-vars LAMBDA-LIST

Returns all keyword variables of the ordinary-lambda-list.

Package

lambda-fiddle

Source

lambda-fiddle.lisp (file)

Function: lambda-keyword-p SYMBOL

Returns the symbol if it is a lambda-keyword symbol (the &-options).

Package

lambda-fiddle

Source

lambda-fiddle.lisp (file)

Function: optional-lambda-vars LAMBDA-LIST

Returns all optional variables of the ordinary-lambda-list.

Package

lambda-fiddle

Source

lambda-fiddle.lisp (file)

Function: remove-aux-part LAMBDA-LIST

Returns a fresh lambda-list without the &aux part.

Package

lambda-fiddle

Source

lambda-fiddle.lisp (file)

Function: remove-body-part LAMBDA-LIST

Returns a fresh lambda-list without the &body part.

Package

lambda-fiddle

Source

lambda-fiddle.lisp (file)

Function: remove-environment-part LAMBDA-LIST

Returns a fresh lambda-list without the &environment part.

Package

lambda-fiddle

Source

lambda-fiddle.lisp (file)

Function: remove-key-part LAMBDA-LIST

Returns a fresh lambda-list without the &key part (also removing &allow-other-keys if present).

Package

lambda-fiddle

Source

lambda-fiddle.lisp (file)

Function: remove-optional-part LAMBDA-LIST

Returns a fresh lambda-list without the &optional part.

Package

lambda-fiddle

Source

lambda-fiddle.lisp (file)

Function: remove-required-part LAMBDA-LIST

Returns a fresh lambda-list without the required variables part.

Package

lambda-fiddle

Source

lambda-fiddle.lisp (file)

Function: remove-rest-part LAMBDA-LIST

Returns a fresh lambda-list without the &rest part.

Package

lambda-fiddle

Source

lambda-fiddle.lisp (file)

Function: remove-whole-part LAMBDA-LIST

Returns a fresh lambda-list without the &whole part.

Package

lambda-fiddle

Source

lambda-fiddle.lisp (file)

Function: required-lambda-vars LAMBDA-LIST

Returns all required variables of the ordinary-lambda-list.

Package

lambda-fiddle

Source

lambda-fiddle.lisp (file)

Function: rest-lambda-var LAMBDA-LIST

Returns the rest variable of the ordinary-lambda-list.

Package

lambda-fiddle

Source

lambda-fiddle.lisp (file)

Function: single-argument-keyword-p SYMBOL

Returns the symbol if it is a single-argument-keyword symbol.

Package

lambda-fiddle

Source

lambda-fiddle.lisp (file)

Function: split-lambda-list LAMBDA-LIST

Splits the lambda-list into its individual definition parts. Returns a list of values as follows: ((REQUIRED*) WHOLE ENVIRONMENT (OPTIONAL*) REST BODY (KEY*) (AUX*))

Package

lambda-fiddle

Source

lambda-fiddle.lisp (file)

Function: whole-lambda-var LAMBDA-LIST

Returns the &whole variable of the lambda-list.

Package

lambda-fiddle

Source

lambda-fiddle.lisp (file)


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

5.2 Internal definitions


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

5.2.1 Functions

Function: flatten! LIST

Destructively flatten the list one level.

Package

lambda-fiddle

Source

lambda-fiddle.lisp (file)


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

Appendix A Indexes


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

A.1 Concepts

Jump to:   F   L  
Index Entry  Section

F
File, Lisp, lambda-fiddle.asd: The lambda-fiddle<dot>asd file
File, Lisp, lambda-fiddle/lambda-fiddle.lisp: The lambda-fiddle/lambda-fiddle<dot>lisp file

L
lambda-fiddle.asd: The lambda-fiddle<dot>asd file
lambda-fiddle/lambda-fiddle.lisp: The lambda-fiddle/lambda-fiddle<dot>lisp file
Lisp File, lambda-fiddle.asd: The lambda-fiddle<dot>asd file
Lisp File, lambda-fiddle/lambda-fiddle.lisp: The lambda-fiddle/lambda-fiddle<dot>lisp file

Jump to:   F   L  

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

A.2 Functions

Jump to:   A   B   C   E   F   K   L   M   O   R   S   W  
Index Entry  Section

A
aux-lambda-vars: Exported functions

B
body-lambda-var: Exported functions

C
collect-for-keyword: Exported functions
construct-lambda-list: Exported functions

E
environment-lambda-var: Exported functions
exclude-for-keyword: Exported functions
extract-all-lambda-vars: Exported functions
extract-lambda-vars: Exported functions

F
flatten!: Internal functions
flatten-lambda-list: Exported functions
flatten-method-lambda-list: Exported functions
Function, aux-lambda-vars: Exported functions
Function, body-lambda-var: Exported functions
Function, collect-for-keyword: Exported functions
Function, construct-lambda-list: Exported functions
Function, environment-lambda-var: Exported functions
Function, exclude-for-keyword: Exported functions
Function, extract-all-lambda-vars: Exported functions
Function, extract-lambda-vars: Exported functions
Function, flatten!: Internal functions
Function, flatten-lambda-list: Exported functions
Function, flatten-method-lambda-list: Exported functions
Function, key-lambda-vars: Exported functions
Function, lambda-keyword-p: Exported functions
Function, optional-lambda-vars: Exported functions
Function, remove-aux-part: Exported functions
Function, remove-body-part: Exported functions
Function, remove-environment-part: Exported functions
Function, remove-key-part: Exported functions
Function, remove-optional-part: Exported functions
Function, remove-required-part: Exported functions
Function, remove-rest-part: Exported functions
Function, remove-whole-part: Exported functions
Function, required-lambda-vars: Exported functions
Function, rest-lambda-var: Exported functions
Function, single-argument-keyword-p: Exported functions
Function, split-lambda-list: Exported functions
Function, whole-lambda-var: Exported functions

K
key-lambda-vars: Exported functions

L
lambda-keyword-p: Exported functions

M
Macro, with-destructured-lambda-list: Exported macros

O
optional-lambda-vars: Exported functions

R
remove-aux-part: Exported functions
remove-body-part: Exported functions
remove-environment-part: Exported functions
remove-key-part: Exported functions
remove-optional-part: Exported functions
remove-required-part: Exported functions
remove-rest-part: Exported functions
remove-whole-part: Exported functions
required-lambda-vars: Exported functions
rest-lambda-var: Exported functions

S
single-argument-keyword-p: Exported functions
split-lambda-list: Exported functions

W
whole-lambda-var: Exported functions
with-destructured-lambda-list: Exported macros

Jump to:   A   B   C   E   F   K   L   M   O   R   S   W  

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

A.3 Variables

Jump to:   *  
S  
Index Entry  Section

*
*lambda-keywords*: Exported special variables
*single-argument-keywords*: Exported special variables

S
Special Variable, *lambda-keywords*: Exported special variables
Special Variable, *single-argument-keywords*: Exported special variables

Jump to:   *  
S  

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

A.4 Data types

Jump to:   L   P   S  
Index Entry  Section

L
lambda-fiddle: The lambda-fiddle system
lambda-fiddle: The lambda-fiddle package

P
Package, lambda-fiddle: The lambda-fiddle package

S
System, lambda-fiddle: The lambda-fiddle system

Jump to:   L   P   S