The fn Reference Manual

Table of Contents

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

The fn Reference Manual

This is the fn Reference Manual, generated automatically by Declt version 2.3 "Robert April" on Wed Mar 14 03:54:11 2018 GMT+0.


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

1 Introduction

fn

A couple of lambda shorthand macros. Their goal is to be used in cases where the word 'lambda and args are longer than the body of the lambda. It fixes this by adding implicit arguments.

(fn* (+ _ _))  -->  (lambda (_) (+ _ _))

(fn* (+ _ _1))  -->  (lambda (_ _1) (+ _ _1))

(fn* (subseq _@ 0 2))  -->  (lambda (&rest _@) (subseq _@ 0 2))

The λ reader macro is gives you the clojure like syntax.

λ(+ _ _)  -->  (lambda (_) (+ _ _))

λ(+ _ _1)  -->  (lambda (_ _1) (+ _ _1))

λ(subseq _@ 0 2)  -->  (lambda (&rest _@) (subseq _@ 0 2))

I REALLY dont like adding reader macros, but as λ is such a rarely used character I dont feel too bad about it.

Finally fn~ and fn~r are functions for partial application. fn+ is for composing functions

Emacs

If you are using emacs and want Meta-l to write the λ symbol, add the following to your .emacs file

(global-set-key (kbd "M-l") (lambda () (interactive) (insert (make-char 'greek-iso8859-7 107))))

Some curiosities

λ_ the identity function

(mapcar λ_ '(1 2 3)) -> (1 2 3)

λ``(1 ,_ 3) list building functions

(mapcar λ`(1 ,_ 3) '(1 2 3)) -> ((1 1 3) (1 2 3) (1 3 3))

λ1 a function that takes no args an returns 1

(funcall λpi) -> 3.141592

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 fn

Author

Chris Bagley (Baggers) <techsnuffle@gmail.com>

License

Public Domain

Description

Some macros for lambda brevity

Dependency

named-readtables

Source

fn.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.


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

3.1 Lisp


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

3.1.1 fn.asd

Location

fn.asd

Systems

fn (system)


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

3.1.2 fn/package.lisp

Parent

fn (system)

Location

package.lisp

Packages

fn


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

3.1.3 fn/mad.lisp

Dependency

package.lisp (file)

Parent

fn (system)

Location

mad.lisp

Internal Definitions

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

3.1.4 fn/fn.lisp

Dependency

mad.lisp (file)

Parent

fn (system)

Location

fn.lisp

Exported Definitions
Internal Definitions

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

4 Packages

Packages are listed by definition order.


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

4.1 fn

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 Compiler macros

Compiler Macro: fn+ &rest FUNCTIONS
Package

fn

Source

fn.lisp (file)

Compiler Macro: fn~ FUNCTION &rest ARGS
Package

fn

Source

fn.lisp (file)


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

5.1.2 Functions

Function: fn+ FUNCTION &rest MORE-FUNCTIONS

Returns a function composed of FUNCTION and MORE-FUNCTIONS that applies its arguments to to each in turn, starting from the rightmost of MORE-FUNCTIONS, and then calling the next one with the primary value of the last.

Package

fn

Source

fn.lisp (file)

Function: fn~ FUNCTION &rest ARGS

Partially apply args to function

Package

fn

Source

fn.lisp (file)

Function: fn~r FUNCTION &rest ARGS

Partially apply args to function

Package

fn

Source

fn.lisp (file)


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

5.2 Internal definitions


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

5.2.1 Special variables

Special Variable: *env*
Package

fn

Source

mad.lisp (file)

Special Variable: *form-handler*
Package

fn

Source

mad.lisp (file)

Special Variable: *stop-on-symbols*
Package

fn

Source

fn.lisp (file)


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

5.2.2 Macros

Macro: defhandler SYMBOL LAMBDA-LIST &body BODY
Package

fn

Source

mad.lisp (file)

Macro: fn* FORM
Package

fn

Source

fn.lisp (file)

Macro: m FORM
Package

fn

Source

mad.lisp (file)

Macro: m-list &body BODY
Package

fn

Source

mad.lisp (file)

Macro: macroexpand-dammit-as-macro FORM
Package

fn

Source

mad.lisp (file)

Macro: with-imposed-bindings &body BODY
Package

fn

Source

mad.lisp (file)

Macro: without-package-locking &body BODY
Package

fn

Source

mad.lisp (file)


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

5.2.3 Functions

Function: binding-to-symbol BINDING
Package

fn

Source

mad.lisp (file)

Function: clean-fbindings BINDINGS

Return a set of bindings that always defaults to nil

Package

fn

Source

mad.lisp (file)

Function: compiler-macroexpand-1 FORM &optional *ENV*
Package

fn

Source

mad.lisp (file)

Function: declare-fbindings-ignorable BINDINGS
Package

fn

Source

mad.lisp (file)

Function: declare-lambda-list-ignorable LAMBDA-LIST
Package

fn

Source

mad.lisp (file)

Function: default-form-handler FIRST &rest REST
Package

fn

Source

mad.lisp (file)

Function: dump-fbinding NAME LAMBDA-LIST &rest BODY
Package

fn

Source

mad.lisp (file)

Function: dump-fbindings BINDINGS
Package

fn

Source

mad.lisp (file)

Function: e FORM
Package

fn

Source

mad.lisp (file)

Function: e-list LIST
Package

fn

Source

mad.lisp (file)

Function: filter-tree TREE PREDICATE &optional STOP-ON
Package

fn

Source

fn.lisp (file)

Function: fn*-internals FORM ENV
Package

fn

Source

fn.lisp (file)

Function: force-first X
Package

fn

Source

mad.lisp (file)

Function: force-list X
Package

fn

Source

mad.lisp (file)

Function: form-handler FIRST
Package

fn

Source

mad.lisp (file)

Function: function-name-p NAME
Package

fn

Source

mad.lisp (file)

Function: hander-block BLOCK NAME &rest BODY
Package

fn

Source

mad.lisp (file)

Function: hander-catch CATCH TAG &rest BODY
Package

fn

Source

mad.lisp (file)

Function: hander-declare DECLARE &rest BODY
Package

fn

Source

mad.lisp (file)

Function: hander-defun DEFUN NAME LAMBDA-LIST &rest BODY
Package

fn

Source

mad.lisp (file)

Function: hander-eval-when EVAL-WHEN SITUATION &rest BODY
Package

fn

Source

mad.lisp (file)

Function: hander-flet FLET BINDINGS &rest BODY
Package

fn

Source

mad.lisp (file)

Function: hander-function FUNCTION NAME
Package

fn

Source

mad.lisp (file)

Function: hander-go GO TAG
Package

fn

Source

mad.lisp (file)

Function: hander-labels LABELS BINDINGS &rest BODY
Package

fn

Source

mad.lisp (file)

Function: hander-lambda LAMBDA LAMBDA-LIST &rest BODY
Package

fn

Source

mad.lisp (file)

Function: hander-let LET BINDINGS &rest BODY
Package

fn

Source

mad.lisp (file)

Function: hander-let* LET* BINDINGS &rest BODY
Package

fn

Source

mad.lisp (file)

Function: hander-load-time-value LOAD-TIME-VALUE FORM &optional READ-ONLY-P
Package

fn

Source

mad.lisp (file)

Function: hander-macrolet MACROLET BINDINGS &rest BODY
Package

fn

Source

mad.lisp (file)

Function: hander-named-lambda NAMED-LAMBDA NAME LAMBDA-LIST &rest BODY
Package

fn

Source

mad.lisp (file)

Function: hander-progn PROGN &rest BODY
Package

fn

Source

mad.lisp (file)

Function: hander-progv PROGV SYMBOLS VALUES &rest BODY
Package

fn

Source

mad.lisp (file)

Function: hander-quote QUOTE OBJECT
Package

fn

Source

mad.lisp (file)

Function: hander-return-from RETURN-FROM NAME &optional VALUE
Package

fn

Source

mad.lisp (file)

Function: hander-setq SETQ &rest PAIRS
Package

fn

Source

mad.lisp (file)

Function: hander-tagbody TAGBODY &rest TAGS-AND-FORMS
Package

fn

Source

mad.lisp (file)

Function: hander-the THE VALUE-TYPE FORM
Package

fn

Source

mad.lisp (file)

Function: hander-unwind-protect UNWIND-PROTECT PROTECTED-FORM &rest CLEANUP
Package

fn

Source

mad.lisp (file)

Function: lambda-reader STREAM CHAR
Package

fn

Source

fn.lisp (file)

Function: macroexpand-dammit FORM &optional *ENV*
Package

fn

Source

mad.lisp (file)

Function: macroexpand-dammit-expansion FORM &optional *ENV*
Package

fn

Source

mad.lisp (file)

Function: macroexpand-dammit-string STR
Package

fn

Source

mad.lisp (file)

Function: maybe-locally FORMS
Package

fn

Source

mad.lisp (file)

Function: normalized-arg-count X
Package

fn

Source

fn.lisp (file)

Function: runtime-symbol NAME PACKAGE-NAME
Package

fn

Source

mad.lisp (file)

Function: tagbody-restore-tags LIST
Package

fn

Source

mad.lisp (file)

Function: valid-_-name X
Package

fn

Source

fn.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, fn.asd: The fn<dot>asd file
File, Lisp, fn/fn.lisp: The fn/fn<dot>lisp file
File, Lisp, fn/mad.lisp: The fn/mad<dot>lisp file
File, Lisp, fn/package.lisp: The fn/package<dot>lisp file
fn.asd: The fn<dot>asd file
fn/fn.lisp: The fn/fn<dot>lisp file
fn/mad.lisp: The fn/mad<dot>lisp file
fn/package.lisp: The fn/package<dot>lisp file

L
Lisp File, fn.asd: The fn<dot>asd file
Lisp File, fn/fn.lisp: The fn/fn<dot>lisp file
Lisp File, fn/mad.lisp: The fn/mad<dot>lisp file
Lisp File, fn/package.lisp: The fn/package<dot>lisp file

Jump to:   F   L  

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

A.2 Functions

Jump to:   B   C   D   E   F   H   L   M   N   R   T   V   W  
Index Entry  Section

B
binding-to-symbol: Internal functions

C
clean-fbindings: Internal functions
Compiler Macro, fn+: Exported compiler macros
Compiler Macro, fn~: Exported compiler macros
compiler-macroexpand-1: Internal functions

D
declare-fbindings-ignorable: Internal functions
declare-lambda-list-ignorable: Internal functions
default-form-handler: Internal functions
defhandler: Internal macros
dump-fbinding: Internal functions
dump-fbindings: Internal functions

E
e: Internal functions
e-list: Internal functions

F
filter-tree: Internal functions
fn*: Internal macros
fn*-internals: Internal functions
fn+: Exported compiler macros
fn+: Exported functions
fn~: Exported compiler macros
fn~: Exported functions
fn~r: Exported functions
force-first: Internal functions
force-list: Internal functions
form-handler: Internal functions
Function, binding-to-symbol: Internal functions
Function, clean-fbindings: Internal functions
Function, compiler-macroexpand-1: Internal functions
Function, declare-fbindings-ignorable: Internal functions
Function, declare-lambda-list-ignorable: Internal functions
Function, default-form-handler: Internal functions
Function, dump-fbinding: Internal functions
Function, dump-fbindings: Internal functions
Function, e: Internal functions
Function, e-list: Internal functions
Function, filter-tree: Internal functions
Function, fn*-internals: Internal functions
Function, fn+: Exported functions
Function, fn~: Exported functions
Function, fn~r: Exported functions
Function, force-first: Internal functions
Function, force-list: Internal functions
Function, form-handler: Internal functions
Function, function-name-p: Internal functions
Function, hander-block: Internal functions
Function, hander-catch: Internal functions
Function, hander-declare: Internal functions
Function, hander-defun: Internal functions
Function, hander-eval-when: Internal functions
Function, hander-flet: Internal functions
Function, hander-function: Internal functions
Function, hander-go: Internal functions
Function, hander-labels: Internal functions
Function, hander-lambda: Internal functions
Function, hander-let: Internal functions
Function, hander-let*: Internal functions
Function, hander-load-time-value: Internal functions
Function, hander-macrolet: Internal functions
Function, hander-named-lambda: Internal functions
Function, hander-progn: Internal functions
Function, hander-progv: Internal functions
Function, hander-quote: Internal functions
Function, hander-return-from: Internal functions
Function, hander-setq: Internal functions
Function, hander-tagbody: Internal functions
Function, hander-the: Internal functions
Function, hander-unwind-protect: Internal functions
Function, lambda-reader: Internal functions
Function, macroexpand-dammit: Internal functions
Function, macroexpand-dammit-expansion: Internal functions
Function, macroexpand-dammit-string: Internal functions
Function, maybe-locally: Internal functions
Function, normalized-arg-count: Internal functions
Function, runtime-symbol: Internal functions
Function, tagbody-restore-tags: Internal functions
Function, valid-_-name: Internal functions
function-name-p: Internal functions

H
hander-block: Internal functions
hander-catch: Internal functions
hander-declare: Internal functions
hander-defun: Internal functions
hander-eval-when: Internal functions
hander-flet: Internal functions
hander-function: Internal functions
hander-go: Internal functions
hander-labels: Internal functions
hander-lambda: Internal functions
hander-let: Internal functions
hander-let*: Internal functions
hander-load-time-value: Internal functions
hander-macrolet: Internal functions
hander-named-lambda: Internal functions
hander-progn: Internal functions
hander-progv: Internal functions
hander-quote: Internal functions
hander-return-from: Internal functions
hander-setq: Internal functions
hander-tagbody: Internal functions
hander-the: Internal functions
hander-unwind-protect: Internal functions

L
lambda-reader: Internal functions

M
m: Internal macros
m-list: Internal macros
Macro, defhandler: Internal macros
Macro, fn*: Internal macros
Macro, m: Internal macros
Macro, m-list: Internal macros
Macro, macroexpand-dammit-as-macro: Internal macros
Macro, with-imposed-bindings: Internal macros
Macro, without-package-locking: Internal macros
macroexpand-dammit: Internal functions
macroexpand-dammit-as-macro: Internal macros
macroexpand-dammit-expansion: Internal functions
macroexpand-dammit-string: Internal functions
maybe-locally: Internal functions

N
normalized-arg-count: Internal functions

R
runtime-symbol: Internal functions

T
tagbody-restore-tags: Internal functions

V
valid-_-name: Internal functions

W
with-imposed-bindings: Internal macros
without-package-locking: Internal macros

Jump to:   B   C   D   E   F   H   L   M   N   R   T   V   W  

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

A.3 Variables

Jump to:   *  
S  
Index Entry  Section

*
*env*: Internal special variables
*form-handler*: Internal special variables
*stop-on-symbols*: Internal special variables

S
Special Variable, *env*: Internal special variables
Special Variable, *form-handler*: Internal special variables
Special Variable, *stop-on-symbols*: Internal special variables

Jump to:   *  
S  

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

A.4 Data types

Jump to:   F   P   S  
Index Entry  Section

F
fn: The fn system
fn: The fn package

P
Package, fn: The fn package

S
System, fn: The fn system

Jump to:   F   P   S