com.github.dakusui.lisj.package-info Maven / Gradle / Ivy
/**
* Lisj's object model.
*
*
* Non-atoms:
*
* - Arrays of {@code java.lang.Object}s. ({@code Object[]})
* - Objects of {@code Pair}.
*
*
* Atoms:
*
* - Any primitives.
* - Any arrays other than {@code Object[]}.
* - Any objects other than {@code Pair}
* - {@code null}
* - Shortly to say, any non-non-atoms.
*
*
*
*
* Lisj interprets an array of objects as a 'cons' pair or a list.
*
*
* cons representation normalized array representation (NAR)
* NIL []
* (A . NIL) [A]
* (A . (B . NIL)) [A B]
* ((A . B) . NIL) [[A . B]]
* (NIL . NIL) [NIL]
* (A . B) (A . B)
* (A . (B . C)) [A (B . C)]
* [A [B C]]
*
*
*
* - 'A' and 'B' exists in {{@code null}, any non-array objects.
* - {@code NIL} is an atom.
* - NAR's last element is always an atom.
* - A cons cell whose cdr is an atom doesn't have NAR.
* - Arrays of primitives (int, boolean, double,...) are considered atoms by {@code Kernel} methods.
*
*/
package com.github.dakusui.lisj;
© 2015 - 2025 Weber Informatics LLC | Privacy Policy