The cl-punch Reference Manual

This is the cl-punch Reference Manual, version 0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Feb 26 15:35:43 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

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


2.1 cl-punch

Scala-like anonymous lambda literal

Author

Windymelt

License

MIT

Long Description

# Cl-Punch - Scala-like anonymous lambda literal

[![Quicklisp](http://quickdocs.org/badge/cl-punch.svg)](http://quickdocs.org/cl-punch/)

## Usage

“‘
;; Enable syntax.
(cl-punch:enable-punch-syntax)

;; ^() is converted into (lambda ...) .
;; Each underscore is converted into a lambda argument.

(mapcar ^(* 2 _) ’(1 2 3 4 5))
;; => ’(2 4 6 8 10)

;; One underscore corresponds one argument.

(^(* _ _) 2 3)
;; => 6

;; <_ reuses last argument.

(mapcar ^(if (oddp _) (* 2 <_) <_) ’(1 2 3 4 5))
;; => ’(2 2 6 4 10)

;; _! corresponds one argument but it is brought to top of the argument list.
;; It can be useful when you want to change argument order.

(^(cons _ _!) :a :b)
;; => (:b . :a)

(^(list _! _! _!) 1 2 3)
;; => ’(3 2 1)
“‘

## Installation

WIP: Register to quicklisp

## Author

* Windymelt

## Copyright

Copyright (c) 2018 Windymelt

## License

Licensed under the MIT License.

Version

0.1

Dependency

cl-syntax (system).

Source

cl-punch.asd.

Child Component

src (module).


3 Modules

Modules are listed depth-first from the system components tree.


3.1 cl-punch/src

Source

cl-punch.asd.

Parent Component

cl-punch (system).

Child Component

cl-punch.lisp (file).


4 Files

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


4.1 Lisp


4.1.1 cl-punch/cl-punch.asd

Source

cl-punch.asd.

Parent Component

cl-punch (system).

ASDF Systems

cl-punch.

Packages

cl-punch-asd.


4.1.2 cl-punch/src/cl-punch.lisp

Source

cl-punch.asd.

Parent Component

src (module).

Packages

cl-punch.

Public Interface
Internals

punch-syntax (special variable).


5 Packages

Packages are listed by definition order.


5.1 cl-punch

Source

cl-punch.lisp.

Use List

common-lisp.

Public Interface
Internals

punch-syntax (special variable).


5.2 cl-punch-asd

Source

cl-punch.asd.

Use List
  • asdf/interface.
  • common-lisp.

6 Definitions

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


6.1 Public Interface


6.1.1 Macros

Macro: enable-punch-syntax ()
Package

cl-punch.

Source

cl-punch.lisp.


6.1.2 Ordinary functions

Function: punch-reader (s c)

A reader which converts _ into lambda argument, <_ into last lambda argument.

Package

cl-punch.

Source

cl-punch.lisp.


6.2 Internals


6.2.1 Special variables

Special Variable: punch-syntax
Package

cl-punch.

Source

cl-punch.lisp.


Appendix A Indexes


A.1 Concepts


A.2 Functions


A.3 Variables

Jump to:   P   S  
Index Entry  Section

P
punch-syntax: Private special variables

S
Special Variable, punch-syntax: Private special variables