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.
- Host: GitHub
- URL: https://github.com/fuco1/prognth
- Owner: Fuco1
- Created: 2013-09-20T17:59:04.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2013-09-20T18:00:02.000Z (over 12 years ago)
- Last Synced: 2025-02-07T07:46:30.346Z (about 1 year ago)
- Language: Emacs Lisp
- Size: 102 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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)