Learn R Programming

lisp (version 0.2)

List-Processing à La 'SRFI-1'

Description

Provides list-processing utilities inspired by the 'SRFI-1' list library for Scheme (), including car/cdr family accessors, zip, pairwise, for.each, pair.fold.right and friends. Higher-order helpers that are orthogonal to list processing are deferred to the 'functional' package; this package is freely a mixture of implementation and API.

Copy Link

Version

Install

install.packages('lisp')

Monthly Downloads

1

Version

0.2

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Peter Danenberg

Last Published

June 15th, 2026

Functions in lisp (0.2)

is.odd

Is a number odd?
last

Last element in a list.
caddr

Composite car/cdr
cadar

Composite car/cdr
cdddr

Composite car/cdr
cdr

Return elements after the first of a list.
cadr

Composite car/cdr
cddr

Composite car/cdr
caar

Composite car/cdr
for.each

Apply f to the successive elements of ....
cdrs

Try to get the cdrs; otherwise, return nil.
car

First element of a list
is.even

Is a number even?
is.nil

Whether a list is empty.
zip.list

Zip using list.
zip

Zip n lists together into tuplets of length n.
pairwise

Combine a list into pairwise elements; lists should be of the same length. In case of odd numbers of members, the last will be removed.
zip.c

Zip using c.
pair.fold.right

pair-fold-right from SRFI-1.
nil

The empty list
zip.with.names

Do a less efficient zip whilst preserving names.