User Tools

Site Tools


software:racket:racket_notes

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>)
software/racket/racket_notes.txt · Last modified: 2018/09/22 18:09 by dave