An open API service indexing awesome lists of open source software.

https://github.com/fuco1/prognth

Return value of nth form.
https://github.com/fuco1/prognth

Last synced: 22 days ago
JSON representation

Return value of nth form.

Awesome Lists containing this project

README

          

prognth
======

Emacs provides `prog1`, `prog2` and `progn` to group statements and return the value of first, second or last form. This package extends this notion to allow arbitrary index. The macro `prognth` takes as a first argument the index of the form whose value is to be returned. If the index is 1, 2 or greater than length of the body, the standard emacs forms are used. Otherwise, this translates to

(prog1 (progn ... first INDEX forms) rest)