Racket is an actively used programming language created in 1994.

25Years Old 11,546Users 50Jobs

Example code from the Hello World Collection:

;; Hello world in Racket

#lang racket/base
"Hello, World!"

Example code from Linguist:

; Clean, simple and efficient code -- that's the power of Racket!
; http://racket-lang.org/

(define (bottles n more)
  (printf "~a bottle~a of beer~a"
          (case n [(0) "no more"] [(1) "1"] [else n])
          (if (= n 1) "" "s")

(for ([n (in-range 99 0 -1)])
  (bottles n " on the wall, ")
  (bottles n ".\n")
  (printf "Take one down and pass it around, ")
  (bottles (sub1 n) " on the wall.\n\n"))

(displayln "No more bottles of beer on the wall, no more bottles of beer.")
(displayln "Go to the store and buy some more, 99 bottles of beer on the wall.")

Example code from Wikipedia:

#lang typed/racket

(: fact (Integer -> Integer))
(define (fact n)
  (cond [(zero? n) 1]
        [else (* n (fact (- n 1)))]))

Last updated February 11th, 2019