schemeR-package: schemeR: Make R more like Lisp/Scheme

Description Interface functions Lisp operators

Description

Provides a way to write R code in a Lisp-like prefix form, with access to versions of many common Lisp operators (let, letrec, cond, do, etc.). True (defmacro-based, rather than syntax-case) Lisp macros are also supported and are optimized to work with this sort of prefix code.

Interface functions

The main entry point is the schemeR() function, which translates prefix code into the usual infix R form, and evaluates it. Other functions involved in implementing the prefix syntax are prefix() and infix(), which respectively translate infix code to prefix, and translate prefix code to infix. The . function is the building block of prefix code, but is not especially useful in its own right.

Lisp operators

A large number of Lisp operators have been implemented, mostly in ways that are useful in either prefix or infix code. The highlight is the reasonably complete macro support, but other operators run the gamut from functional programming primitives (lambda, zip, for.each, etc.) to list/vector manipulation (car, cdr, set.car, etc.) to block-structure and lexical binding operators (let, letrec, cond, etc.). See the vignettes for a full list and discussion.


wwbrannon/schemeR documentation built on May 4, 2019, 12:03 p.m.