Top 1K Features Creators Events Podcasts Books Extensions Interviews Blog Explorer CSV

Scheme

< >

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

#60on PLDB 49Years Old 17kRepos
Homepage · REPL · Blog · Wikipedia · FAQ · Release Notes · Docs

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 Example Token
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
Case Insensitive Identifiers X
Semantic Indentation X

- Build the next great programming language · Add · Issues · About · Search · Keywords · Livestreams · Labs · Resources · Acknowledgements

Built with Scroll v154.2.0