Top 1,000 Features Creators Resources Extensions Blog Explorer CSV Download
GitHub icon


< >

Scheme is a programming language created in 1975 by Guy Steele and Gerald Jay Sussman.

#57on PLDB 49Years Old 17kRepos

Try now: Riju ยท Replit

Scheme is a functional programming language and one of the two main dialects of the programming language Lisp. Unlike Common Lisp, the other main dialect, Scheme follows a minimalist design philosophy specifying a small standard core with powerful tools for language extension. Scheme was created during the 1970s at the MIT AI Lab and released by its developers, Guy L. Read more on Wikipedia...

Example from Riju:
(display "Hello, world!") (newline)
Example from hello-world:
(display "Hello World") (newline)
; Hello World in Scheme (display "Hello, world!") (newline)
Example from Linguist:
(define-library (libs basic) (export list2 x) (begin (define (list2 . objs) objs) (define x 'libs-basic) (define not-exported 'should-not-be-exported) ))
Example from Wikipedia:
(set! + (let ((original+ +)) (lambda args (if (and (not (null? args)) (string? (car args))) (apply string-append args) (apply original+ args))))) (+ 1 2 3) ===> 6 (+ "1" "2" "3") ===> "123"
Scheme Keywords
case do let loop if else when cons car cdr cond lambda lambda* syntax-rules format set! quote eval append list list? member? load

Language features

Feature Supported Token Example
Conditionals โœ“
Strings โœ“ "
"Hello world"
MultiLine Comments โœ“ #| |#
#| A comment
Print() Debugging โœ“ display
Homoiconicity โœ“
Prefix Notation โœ“
(+ 1 2 3)
Macros โœ“
(define-syntax backwards
 (syntax-rules ()
   ((_) (syntax-error "(backwards) not allowed"))
   ((_ e) e)
   ((_ e1 ... e2)
    (begin e2 (backwards e1 ...)))))
Line Comments โœ“ ;
; A comment
Comments โœ“
Lispy โœ“
Case Insensitive Identifiers X
Semantic Indentation X

View source

- Build the next great programming language ยท About ยท Acknowledgements ยท Published by Breck's Lab