that the syntax extends plain S-expressions, and is implemented as an alternative input for such expressions. #lang scribble/text Hi, I'm a text file -- run me. @(define (thrice . text) @list{@text, @text, @text}) @thrice{SPAM}! @thrice{HAM}! Typed Racket Typed Racket is a statically typed variant of Racket. The type system that it implements is unique in that the motivation in developing it was accommodating as much idiomatic Racket code as possible—as a result, it includes subtypes, unions, and much more. Another goal of Typed Racket is to allow migration of parts of a program into the typed language, so it accommodates calling typed code from untyped code and vice versa, generating dynamic contracts to enforce type invariants. This is considered a desirable feature of an application's lifetime stages, as it matures from "a script" to "an application", where static typing helps in maintenance of a large body of code. #lang typed/racket ;; Using higher-order occurrence typing (define-type Str-or-Num (U String Number)) (: tog ((Listof Str-or-Num) -> String)) (define (tog l) (apply string-append (filter string? l))) (tog (list 5 "hello " 1/2 "world" (sqrt -1))) Lazy Racket The lazy language is a language with lazy evaluation semantics, similar to Haskell. In the following example, fibs is an infinite list whose 1000th element will not be computed until its value is needed for the printout. #lang lazy ;; An infinite list: (define fibs (list* 1 1 (map + fibs (cdr fibs)))) ;; Print the 1000th Fibonacci number: (print (list-ref fibs 1000)) Logic programming Racket comes with three logic programming languages: Racklog, a Prolog-like language; a Datalog implementation; and a miniKanren port. Unlike the Scribble syntax, the first two of these languages use a completely new syntax rather than an extension of S-expressions. If you use it in DrRacket, you'll see that it provides proper highlighting, the usual host of tools check syntax, and a Prolog/Datalog REPL. #lang datalog ancestor(A, B) :- parent(A, B). ancestor(A, B) :- parent(A, C), D = C, ancestor(D, B). parent(john, douglas). parent(bob, john). ancestor(A, B)? Educational tools The PLT group which develops Racket has traditionally been involved in education at all levels. One of the earliest research ideas that the group promoted is the use of language levels, which restrict new students while providing them with helpful error messages that fit the student's level of knowledge. This approach is heavily used in How to Design Programs, the textbook that