I've played around with a few functional programming languages and really enjoy the s-expr syntax used by Lisps (Scheme in particular).
I also see the advantages of working in a purely functional language. Therefore:
Are there any purely functional Schemes (or Lisps in general)?
Strictly speaking, Lisp is a functional programming language; that is, functions are first-class objects in Lisp. However, it is not a pure-functional language such as Haskell, because operations in Lisp can have side-effects.
A LISP program is a function applied to data, rather than being a sequence of procedural steps as in FORTRAN and ALGOL.
The new Racket language (formerly PLT Scheme) allows you to implement any semantics you like with s-expressions (really any syntax). The base language is an eagerly evaluated, dynamically typed scheme variant but some notable languages built on top are a lazy scheme and a functional reactive system called Father Time.
An easy way to make a purely functional language in Racket is to take the base language and not provide any procedures that mutate state. For example:
#lang racket/base (provide (except-out (all-from-out racket/base) set! ...more here...))
makes up a language that has no set!
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With