List of all Scheme Primitive Procedures
An official list of all Scheme primitives and their meaning is available in the
index
of the online manual.
I have included a brief overview of the Scheme primitives below for quick reference.
THIS PAGE IS STILL UNDER CONSTRUCTION
Key
- Basic features
- Advanced features
- procedure arguments
- (exact->inexact n ) -- converts an exact number n to an inexact number
- (inexact->exact x ) -- converts an inexact number x to an exact number
- (* x y ... z) multiplies a sequence of numbers
- (+ x y ... z ) adds a sequence of numbers
- (- x y ) subtracts two numbers
- (/ x y ) divides two numbers
- (< x y ) compares two numbers, returns #t if x is less than y
- (<=x y ) compares two numbers, returns #t if x is less than or equal to y
- (= x y) compares two numbers, returns #t if x is equal to y
- (> x y ) compares two numbers, returns #t if x is greater than y
- (>= x y ) compares two numbers, returns #t if x is greater than or equal to y
- (abs x ) the absolute value of x
- (acos x ) the arc cosine of x
- (append x y) appends two lists x y to get a new list
- (apply f arguments ) applies the function f to the list of arguments
- (asin x) the arc sine of x
- (assoc x alist) alist is a list of pairs (key value), if x is one of those keys, the value is returned.
equal? is used to compare x and key.
- (assq x alist) Same as assoc, but eq? is used to compare x and key.
- (assv x alist) Same as assoc, but eqv? is used to compare x and key.
- (atan x) the arc tangent of x
- (boolean? b ) #t if b is a boolean value: #t or #f
- (caaaar )
- (caaadr )
- (caaar )
- (caadar )
- (caaddr )
- (caadr )
- (caar )
- (cadaar )
- (cadadr )
- (cadar )
- (caddar )
- (cadddr )
- (caddr )
- (cadr )
- (call-with-current-continuation )
- (call-with-input-file )
- (call-with-output-file )
- (car L ) the first element in the list L
- (cdaaar )
- (cdaadr )
- (cdaar )
- (cdadar )
- (cdaddr )
- (cdadr )
- (cdar )
- (cddaar )
- (cddadr )
- (cddar )
- (cdddar )
- (cddddr )
- (cdddr )
- (cddr )
- (cdr L ) the list obtained by removing the first element from the list L
- (char->integer )
- (char-alphabetic? )
- (char-ci<=? )
- (char-ci )
- (char-ci=? )
- (char-ci>=? )
- (char-ci>? )
- (char-downcase )
- (char-lower-case? )
- (char-numeric? )
- (char-upcase )
- (char-upper-case? )
- (char-whitespace? )
- (char<=? )
- (char )
- (char=? )
- (char>=? )
- (char>? )
- (char? )
- (close-input-port )
- (close-output-port )
- (complex? )
- (cons x L ) the list obtained by adding x to the beginning of the list L
- (cos x) the cosine of x
- (current-input-port )
- (current-output-port )
- (display T ) print the term T on the Java console
- (eof-object? )
- (eq? )
- (equal? x y) returns #t if x and y are equal?
- (eqv? )
- (eval )
- (even? x) #t if x is an even number
- (exact? )
- (exp x ) the exponential function applied to x
- (expt n e ) raise n to the power e
- (floor x) return the largest integer less than x
- (for-each P L ) apply the procedure P to every element of the list L
- (force )
- (gcd x y ) find the greatest common divisor of x and y
- (inexact? )
- (input-port? )
- (integer->char )
- (interaction-environment )
- (integer? x ) #t if x is an integer
- (lcm x y) return the least common multiple of x and y
- (length L) return the length of the list L
- (list x y ... z) make a list from the elements x, y, ... z
- (list->string )
- (list->vector )
- (list-ref )
- (list-tail )
- (list? L) returns #t if L is a list
- (load F) load the file F into the Scheme interpreter
- (log x) the logarithmic function applied to x
- (macro-expand )
- (make-string )
- (make-vector )
- (map F L) return the list obtained by applying the function F to every element of the list L
- (max a b c ... d) find the largest of the numbers a, b, ..., d
- (member x L) return #t if x is a member of the list L
- (memq )
- (memv )
- (min a b c ... d) find the smallest of the numbers a, b, ..., d
- (modulo n d) return the remainder of n divided by d
- (negative? x) return #t if x is a negative number
- (newline) write a newline on the Java console
- (not b) negates the truth value b
- (null-environment )
- (null? L ) return #t if L is the empty list
- (number->string )
- (number? x ) return #t if x is a number
- (odd? x) return #t if x is an odd number
- (open-input-file )
- (open-output-file )
- (output-port? )
- (pair? L) return #t if L is a pair.
- (peek-char )
- (positive? x) return #t if x is a positive number
- (procedure? p) return #t if p is a procedure
- (quotient x y ) return the integer quotient of x divided by y
- (rational? )
- (read )
- (read-char )
- (real? )
- (remainder x y) return the remainder of x divided by y
- (reverse L) reverse the list L
- (round x) return the nearest integer to the number x
- (scheme-report-environment )
- (set-car! )
- (set-cdr! )
- (sin x) the sine of x
- (sqrt x) the square root of x
- (string )
- (string->list )
- (string->number )
- (string->symbol )
- (string-append a b c ... d) combine the strings a, b, ..., d into a single new string
- (string-ci<=? )
- (string-ci )
- (string-ci=? )
- (string-ci>=? )
- (string-ci>? )
- (string-copy )
- (string-fill! )
- (string-length x) return the number of characters in the string x
- (string-ref )
- (string-set! )
- (string<=? )
- (string )
- (string=? )
- (string>=? )
- (string>? )
- (string? )
- (substring s i j ) return the substring of s that starts at position i and ends right before position j,
where 0 is the first position in the string.
- (symbol->string )
- (symbol? s) return #t if s is a symbol
- (tan x) tangent of x
- (truncate x) remove the fractional part of the decimal x to get an integer
- (vector )
- (vector->list )
- (vector-fill! )
- (vector-length )
- (vector-ref )
- (vector-set! )
- (vector? )
- (write )
- (write-char )
- (zero? z) return #t if z equals 0
- (ceiling x ) return the smallest integer greater than or equal to x
- (constructor )
- (class )
- (method )
- (exit )
- (error )
- (time-call E N) evaluate the expression E repeatedly N times and return
the average number of milliseconds for each call
- (_list* )