Nitrogen is a Lisp-based programming language I created to learn fundamentally how programming languages work. It is not designed to be used in any sort of production environment. It’s very minimal, but usable. It’s based off the book Build Your Own Lisp.

On this page you will be able to find the docmentation for the builtin functions as well as the Standard Library. You’ll also find some examples to play with.

You can find the source code for the Nitrogen interpreter at:

Language Fundamentals

Here is where the basics of Nitrogen will be posted.

Language Core

The following words are reserved keywords for builtin functions or operators, or are used in the core library. This means they cannot be redefined using the (def) functions.

Internal - Functions and Operators

\ = const def error eval
exit head join list load print
tail undef

Internal - Arithmatic and Comparison Operators

+ - * / % if
== != > < >= <=

Core Library - Language Constructs

nil true false pfun fun
do not or and ++
-- select case otherwise

Core Library

Core Library - Functions (Note: These can be undefined. They will eventually be implemented in the interpreter directly but for now are written in Nitrogen.)

curry drop drop-while elem filter
foldl foldr fst init last
len lookup map nth pack
product reverse snd split sum
take take-while trd uncurry unpack
unzip zip

Standard Library

This is where you’ll eventually find documentation for the Standard Library.


Here you will find examples of the language in action.