Lisp, the way God (probably didn't) intend.
This repository has been archived on 2024-07-15. You can view files and clone it, but cannot push or open issues or pull requests.
Find a file
Apache c0b776401a
Add bools and instants, add a few functions
Light formatting as well
2024-06-29 02:17:06 -05:00
assets Make logo less offensive 2024-06-21 21:55:54 -05:00
src Add bools and instants, add a few functions 2024-06-29 02:17:06 -05:00
.gitignore Add README.md, small additions 2024-06-21 21:16:57 -05:00
Cargo.lock Update project name 2024-06-20 20:55:18 -05:00
Cargo.toml Add README.md, small additions 2024-06-21 21:16:57 -05:00
README.md Readme additions 2024-06-25 00:39:43 -05:00

Holy Lisp

Holy Lisp Logo

An opinionated lisp implementation developed in the most intuitive way I could come up with.

Features

Lists with a function as the first element are evaluated when needed

(print (add 1 2)) ; => 3
(print (1 2 3)) ; => (1 2 3)

Quoted lists are not evaluated

(print '(add 1 2)) ; => '(<function add> 1 2)

Elements within quoted lists can be unquoted

(print 
	'(add
		1 ,(sub 3 1)
	)
) ; => '(<function add> 1 2)

Maps can be indexed with .

; In this example, ball_pos is a map
(print ball_pos.x ball_pos.y)

; This is just syntax sugar for
(get ball_pos "x")

Functions can be defined and called like so

(fn hello(name) (
	(print (concat "Hello, " name "!"))
))

(hello "Joe") ; => "Hello, Joe!"


; Anonymous function creation
(
	(fn(x) (print x))
	15
) ; => 15