LittleLisp


PLATFORM
Web Browser (JavaScript)

ATTENPTION
Texts and Comments in Source Files were written in Japanese.


This is LISP for Turing completeness on JavaScript.
Contains all 10 keywords, CONS, COND, DEFINE, ATOM, CAR, CDR, LABEL, QUOTE, EQ and LAMBDA. 
(Reserved words are its 10 keywords and T and NIL.)
All coments are in Japanese. 
All Projects

Comparison with LISPs
Minimal-LISPSukunaLISPJunLISP
ScopeHybrid *1
(Lexical & Dynamic)
DynamicDynamic
First-Class FunctionYesNo *2Yes
MacroNoNoYes *3
1 code over multi-line *4NoYesYes
multi-code in 1 line *5NoYesYes
with comment *6NoYesYes
  1. Closure is OK.
    e.g.
    ; closure variable x in f
    (label f ((lambda () (cond ((label x 'foo) (lambda () (cons x x)))))))
    ; (f) result (FOO . FOO)
    (f)
    ; next code is error (x is not found in global)
    (cons x x)
  2. except LABEL, DEFINE, LAMBDA, COND and head of list.
    e.g.
    (label f (lambda (x) (cons x 'foo)))
    (define g (lambda (y) (cons y 'bar)))
    (cond ('t (lambda (z) (cons z 'baz))))
    (lambda () (lambda (x) (cons x x)))
    ((lambda (a) a) 'b)
    ; combinate
    (label h (lambda (x) (cond ((eq x 'f) f) ('t g))))
    ((h 'f) 'abc) ; (ABC . FOO)
  3. place LAMBDA list on head of list.
    e.g.
    (label list (lambda x x))
    ((list 'lambda '(x) (list 'cons 'x 'x)) 'foo) ; (FOO . FOO)
  4. e.g.
    (cons
    'a
    'b) ; 1 code over multi-line.
  5. e.g.
    (cons 'a 'b) (cons 'x 'y) ; 2 codes in 1 line.
  6. e.g.
    (cons 'a 'b) ; comment here.

Source Files

Download ZIP File
Download TAR Ball
View On GitHub


LICENSE
The MIT License (MIT)

Copyright (c) 2013 Leonardone @ NEETSDKASU

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.