Lisp, the way God (probably didn't) intend
Find a file
Apache 5e7f23c1be
Some checks failed
Rust / build (push) Failing after 9s
Workflow test 2
2024-07-15 02:34:09 -05:00
.forgejo/workflows Workflow test 2 2024-07-15 02:34:09 -05:00
assets Init 2024-07-15 02:21:21 -05:00
src Init 2024-07-15 02:21:21 -05:00
.gitignore Init 2024-07-15 02:21:21 -05:00
Cargo.lock Init 2024-07-15 02:21:21 -05:00
Cargo.toml Init 2024-07-15 02:21:21 -05:00
README.md Init 2024-07-15 02:21:21 -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