Table of Contents

Racket Functions

cons

Creates a newly allocated pair.

(cons <first-value> <second-value>)

car

Returns the first value of a pair created with cons.

(car <pair-created-by-cons>)

cdr

Returns the second value of a pair created with cons.

(cdr <par-created-by-cons>)

cond

It's somewhat like a switch statement in other languages:

  (cond 
    (<condition> <value-if-true>) 
    (<condition> <value-if-true>)... 
    (<value if false>))

string-append

Appends strings. Arguments *must* be strings already.

(string-append <str1> <strN>...)

number->string

Converts a number to a string.

(number->string <number>)