Rosetta Lisp

16 Feb 2023 - me :3

This is a syntax comparison of Lisp-like languages (Clojure, Common Lisp, Scheme (Racket) and possibly more in the future)

VERY UNFINISHED, will be updated gradually as I go through learning Lisp and its derivatives

Defining a Function

Clojure

(defn double
   [x]
   (/ x 2)) 
 

Common Lisp

(defun half (x)
   (/ x 2))

Scheme

(define (half x)
   (/ x 2))

Lambdas

Clojure

(fn [x]
   (/ x 2)) 
 

Clojure (Alternative)

#(/ % 2) 
 

Common Lisp

(lambda (x)
   (/ x 2))

Scheme

(lambda (x)
   (/ x 2))