fchtngr / alispinterpreter

A minimal lisp interpreter written in C#.

Home Page:http://dotnet.jku.at/applications/course11/Feichtinger/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A minimal Lisp Interpreter in C#

A minimal lisp interpreter written in C#.

Supported Operators:

  • quote, if, lambda
  • Arithmetic operators: +, *, -, /
  • List operations: first, rest, cons, list
  • Comparisons: >, >=, <, <=, =

For more info look here

Sample I/O

ttl>(define x 2)
2
ttl>(* x 5)
10
ttl>(set x (+ x x))
4
ttl>(define square(lambda (x) (* x x)))
lambda
ttl>(square x)
16
ttl>(define compose (lambda (f g) (lambda (x) (f (g x)))))
lambda
ttl>((compose square square) 2)
16
ttl>(define  fact (lambda (n) (if (<= n 1) 1 (* n (fact (- n 1))))))
lambda
ttl>(fact 10)
3628800
ttl>

Screenshots of the GUI

GUI1

GUI2

About

A minimal lisp interpreter written in C#.

http://dotnet.jku.at/applications/course11/Feichtinger/


Languages

Language:C# 100.0%