aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
blob: 1a696b53863ae9e6cf0add9b890d9f6c514f1b29 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# SRFI-259 for CHICKEN

This is an implementation of SRFI-259 for CHICKEN.

Notable features:

* Different than `extend-procedure`, because `extend-procedure` is
  stateful.

This is the first time I've written low-level CHICKEN code: use at your own
risk.

## Usage

Import `(srfi 259)` for only the standard bindings. Import
`(extensions srfi 259)` for the SRFI-259 macro and the extensions
described below.

## Extensions

This library implements lambdas with object scope.

    (lambda/this this formal body ...)

Create a procedure such that `this` will be bound to the current
procedure.  When a new procedure is created using a tag constructor,
`this` will point to the new procedure, not to the old procedure. This
allows for a procedure to inspect its own tags.

    (procedure/this? obj)

Returns true if `obj` is a procedure created using `lambda/this`.