diff options
author | elioat <elioat@tilde.institute> | 2023-08-23 07:52:19 -0400 |
---|---|---|
committer | elioat <elioat@tilde.institute> | 2023-08-23 07:52:19 -0400 |
commit | 562a9a52d599d9a05f871404050968a5fd282640 (patch) | |
tree | 7d3305c1252c043bfe246ccc7deff0056aa6b5ab /js/games/nluqo.github.io/~bh/ssch27/appendix-funlist.html | |
parent | 5d012c6c011a9dedf7d0a098e456206244eb5a0f (diff) | |
download | tour-562a9a52d599d9a05f871404050968a5fd282640.tar.gz |
*
Diffstat (limited to 'js/games/nluqo.github.io/~bh/ssch27/appendix-funlist.html')
-rw-r--r-- | js/games/nluqo.github.io/~bh/ssch27/appendix-funlist.html | 182 |
1 files changed, 182 insertions, 0 deletions
diff --git a/js/games/nluqo.github.io/~bh/ssch27/appendix-funlist.html b/js/games/nluqo.github.io/~bh/ssch27/appendix-funlist.html new file mode 100644 index 0000000..d53f51c --- /dev/null +++ b/js/games/nluqo.github.io/~bh/ssch27/appendix-funlist.html @@ -0,0 +1,182 @@ +<P> + +<P> +<HTML> +<HEAD> +<TITLE>Simply Scheme: Alphabetical Table of Scheme Primitives</TITLE> +</HEAD> +<BODY> +<CITE>Simply Scheme</CITE>: +<CITE>Introducing Computer Science</CITE> 2/e Copyright (C) 1999 MIT +<H1>Alphabetical Table of Scheme Primitives</H1> + +<TABLE width="100%"><TR><TD> +<IMG SRC="../simply.jpg" ALT="cover photo"> +<TD><TABLE> +<TR><TD align="right"><CITE><A HREF="http://www.cs.berkeley.edu/~bh/">Brian +Harvey</A><BR>University of California, Berkeley</CITE> +<TR><TD align="right"><CITE><A HREF="http://ccrma.stanford.edu/~matt">Matthew +Wright</A><BR>University of California, Santa Barbara</CITE> +<TR><TD align="right"><BR> +<TR><TD align="right"><A HREF="../pdf/ssch27.pdf">Download PDF version</A> +<TR><TD align="right"><A HREF="../ss-toc2.html">Back to Table of Contents</A> +<TR><TD align="right"><A HREF="credits.html"><STRONG>BACK</STRONG></A> +chapter thread <A HREF="glossary.html"><STRONG>NEXT</STRONG></A> +<TR><TD align="right"><A HREF="http://mitpress.mit.edu/0262082810">MIT +Press web page for <CITE>Simply Scheme</CITE></A> +</TABLE></TABLE> + +<HR> + +<A NAME="funlist"></A> + +<P>This table does not represent the complete Scheme language. It includes the +nonstandard Scheme primitives that we use in this book, and it omits many +standard ones that are not needed here. + +<P> + +<P><TABLE> +<TR><TD><CODE>'</CODE> +<TD>Abbreviation for <CODE>(quote</CODE> …<CODE>)</CODE>. +<TR><TD><A NAME="g202"></A><CODE>*</CODE><TD>Multiply numbers. +<TR><TD><A NAME="g203"></A><CODE>+</CODE><TD>Add numbers. +<TR><TD><A NAME="g204"></A><CODE>-</CODE><TD>Subtract numbers. +<TR><TD><A NAME="g205"></A><CODE>/</CODE><TD>Divide numbers. +<TR><TD><CODE><</CODE><TD>Is the first argument less than the second? +<TR><TD><CODE><=</CODE><TD>Is the first argument less than or equal to the second? +<TR><TD><CODE>=</CODE><TD>Are two numbers equal? (Like <CODE>equal?</CODE> but works only for numbers). +<TR><TD><CODE>></CODE><TD>Is the first argument greater than the second? +<TR><TD><CODE>>=</CODE><TD>Is the first argument greater than or equal to the second? +<TR><TD><CODE>abs</CODE><TD>Return the absolute value of the argument. +<TR><TD><CODE>accumulate</CODE><TD>Apply a combining function to all elements +(see <A HREF="../ssch8/higher.html#accum">here</A>). +<TR><TD><CODE>align</CODE><TD>Return a string spaced to a given width (see <A +HREF="../ssch20/io.html#spformat">here</A>). +<TR><TD><CODE>and</CODE><TD>(Special form) Are all of the arguments true values (i.e., not <CODE>#f</CODE>)? +<TR><TD><CODE>appearances</CODE><TD>Return the number of times the first argument is in the second. +<TR><TD><CODE>append</CODE><TD>Return a list containing the elements of the argument lists. +<TR><TD><CODE>apply</CODE><TD>Apply a function to the arguments in a list. +<TR><TD><CODE>assoc</CODE><TD>Return association list entry matching key. +<TR><TD><CODE>before?</CODE><TD>Does the first argument come alphabetically before the second? +<TR><TD><CODE>begin</CODE><TD>(Special form) Carry out a sequence of +instructions (see <A HREF="../ssch20/io.html#beg">here</A>). +<TR><TD><CODE>bf</CODE><TD>Abbreviation for <CODE>butfirst</CODE>. +<TR><TD><CODE>bl</CODE><TD>Abbreviation for <CODE>butlast</CODE>. +<TR><TD><CODE>boolean?</CODE><TD>Return true if the argument is <CODE>#t</CODE> or <CODE>#f</CODE>. +<TR><TD><CODE>butfirst</CODE><TD>Return all but the first letter of a word, or word of a sentence. +<TR><TD><CODE>butlast</CODE><TD>Return all but the last letter of a word, or word of a sentence. +<TR><TD><CODE>c...r</CODE><TD>Combinations of <CODE>car</CODE> and +<CODE>cdr</CODE> (see <A HREF="../ssch17/lists.html#cadr">here</A>). +<TR><TD><CODE>car</CODE><TD>Return the first element of a list. +<TR><TD><CODE>cdr</CODE><TD>Return all but the first element of a list. +<TR><TD><A NAME="g206"></A><CODE>ceiling</CODE><TD>Round a number up to the nearest integer. +<TR><TD><CODE>children</CODE><TD>Return a list of the children of a tree node. +<TR><TD><CODE>close-all-ports</CODE><TD>Close all open input and output ports. +<TR><TD><CODE>close-input-port</CODE><TD>Close an input port. +<TR><TD><CODE>close-output-port</CODE><TD>Close an output port. +<TR><TD><CODE>cond</CODE><TD>(Special form) Choose among several alternatives +(see <A HREF="../ssch6/true.html#cond">here</A>). +<TR><TD><CODE>cons</CODE><TD>Prepend an element to a list. +<TR><TD><A NAME="g207"></A><CODE>cos</CODE><TD>Return the cosine of a number (from trigonometry). +<TR><TD><CODE>count</CODE><TD>Return the number of letters in a word or number of words in a sentence. +<TR><TD><CODE>datum</CODE><TD>Return the datum of a tree node. +<TR><TD><CODE>define</CODE><TD>(Special form) Create a global name (for a procedure or other value). +<TR><TD><CODE>display</CODE><TD>Print the argument without starting a new line. +<TR><TD><CODE>empty?</CODE><TD>Is the argument empty, i.e., the empty word <CODE>""</CODE> or the empty sentence <CODE>()</CODE>? +<TR><TD><CODE>eof-object?</CODE><TD>Is the argument an end-of-file object? +<TR><TD><CODE>equal?</CODE><TD>Are the two arguments the same thing? +<TR><TD><A NAME="g208"></A><CODE>error</CODE><TD>Print an error message and return to the Scheme prompt. +<TR><TD><A NAME="g209"></A><CODE>even?</CODE><TD>Is the argument an even integer? +<TR><TD><CODE>every</CODE><TD>Apply a function to each element of a word or +sentence (see <A HREF="../ssch8/higher.html#every">here</A>). +<TR><TD><A NAME="g210"></A><CODE>expt</CODE><TD>Raise the first argument to the power of the second. +<TR><TD><CODE>filter</CODE><TD>Select a subset of a list (see <A +HREF="../ssch17/lists.html#filter">here</A>). +<TR><TD><CODE>first</CODE><TD>Return first letter of a word, or first word of a sentence. +<TR><TD><A NAME="g211"></A><CODE>floor</CODE><TD>Round a number down to the nearest integer. +<TR><TD><CODE>for-each</CODE><TD>Perform a computation for each element of a list. +<TR><TD><CODE>if</CODE><TD>(Special form) Choose between two alternatives (see +<A HREF="../ssch6/true.html#spif">here</A>). +<TR><TD><A NAME="g212"></A><CODE>integer?</CODE><TD>Is the argument an integer? +<TR><TD><CODE>item</CODE><TD>Return the $n$th letter of a word, or $n$th word of a sentence. +<TR><TD><CODE>keep</CODE><TD>Select a subset of a word or sentence (see <A +HREF="../ssch8/higher.html#keep">here</A>). +<TR><TD><CODE>lambda</CODE><TD>(Special form) Create a new procedure (see Chapter \lambchop). +<TR><TD><CODE>last</CODE><TD>Return last letter of a word, or last word of a sentence. +<TR><TD><CODE>length</CODE><TD>Return the number of elements in a list. +<TR><TD><CODE>let</CODE><TD>(Special form) Give temporary names to values (see +<A HREF="../ssch7/variables.html#splet">here</A>). +<TR><TD><CODE>list</CODE><TD>Return a list containing the arguments. +<TR><TD><CODE>list->vector</CODE><TD>Return a vector with the same elements as the list. +<TR><TD><CODE>list-ref</CODE><TD>Select an element from a list (counting from zero). +<TR><TD><CODE>list?</CODE><TD>Is the argument a list? +<TR><TD><A NAME="g213"></A><CODE>load</CODE><TD>Read a program file into Scheme. +<TR><TD><A NAME="g214"></A><CODE>log</CODE><TD>Return the logarithm of a number. +<TR><TD><CODE>make-node</CODE><TD>Create a new node of a tree. +<TR><TD><CODE>make-vector</CODE><TD>Create a new vector of the given length. +<TR><TD><CODE>map</CODE><TD>Apply a function to each element of a list (see <A +HREF="../ssch17/lists.html#map">here</A>). +<TR><TD><A NAME="g215"></A><CODE>max</CODE><TD>Return the largest of the arguments. +<TR><TD><CODE>member</CODE><TD>Return subset of a list starting with selected element, or <CODE>#f</CODE>. +<TR><TD><CODE>member?</CODE><TD>Is the first argument an element of the +second? (see <A HREF="../ssch6/true.html#memq">here</A>). +<TR><TD><A NAME="g216"></A><CODE>min</CODE><TD>Return the smallest of the arguments. +<TR><TD><CODE>newline</CODE><TD>Go to a new line of printing. +<TR><TD><CODE>not</CODE><TD>Return <CODE>#t</CODE> if argument is <CODE>#f</CODE>; return <CODE>#f</CODE> otherwise. +<TR><TD><CODE>null?</CODE><TD>Is the argument the empty list? +<TR><TD><CODE>number?</CODE><TD>Is the argument a number? +<TR><TD><A NAME="g217"></A><CODE>odd?</CODE><TD>Is the argument an odd integer? +<TR><TD><CODE>open-input-file</CODE><TD>Open a file for reading, return a port. +<TR><TD><CODE>open-output-file</CODE><TD>Open a file for writing, return a port. +<TR><TD><CODE>or</CODE><TD>(Special form) Are any of the arguments true values (i.e., not <CODE>#f</CODE>)? +<TR><TD><A NAME="g218"></A><CODE>procedure?</CODE><TD>Is the argument a procedure? +<TR><TD><CODE>quote</CODE><TD>(Special form) Return the argument, unevaluated +(see <A HREF="../ssch5/words.html#spquote">here</A>). +<TR><TD><A NAME="g219"></A><CODE>quotient</CODE><TD>Divide numbers, but round down to integer. +<TR><TD><A NAME="g220"></A><CODE>random</CODE><TD>Return a random number ≥ 0 and smaller than the argument. +<TR><TD><CODE>read</CODE><TD>Read an expression from the keyboard (or a file). +<TR><TD><CODE>read-line</CODE><TD>Read a line from the keyboard (or a file), returning a sentence. +<TR><TD><CODE>read-string</CODE><TD>Read a line from the keyboard (or a file), returning a string. +<TR><TD><CODE>reduce</CODE><TD>Apply a combining function to all elements of +list (see <A HREF="../ssch17/lists.html#reduce">here</A>). +<TR><TD><A NAME="g221"></A><CODE>remainder</CODE><TD>Return the remainder from dividing the first number by the second. +<TR><TD><CODE>repeated</CODE><TD>Return the function described by +<I>f</I>(<I>f</I>(⋅⋅⋅(<I>f</I>(<I>x</I>)))) (see <A +HREF="../ssch8/higher.html#repeated">here</A>). +<TR><TD><A NAME="g222"></A><CODE>round</CODE><TD>Round a number to the nearest integer. +<TR><TD><CODE>se</CODE><TD>Abbreviation for <CODE>sentence</CODE>. +<TR><TD><CODE>sentence</CODE><TD>Join the arguments together into a big sentence. +<TR><TD><CODE>sentence?</CODE><TD>Is the argument a sentence? +<TR><TD><CODE>show</CODE><TD>Print the argument and start a new line. +<TR><TD><CODE>show-line</CODE><TD>Show the argument sentence without surrounding parentheses. +<TR><TD><A NAME="g223"></A><CODE>sin</CODE><TD>Return the sine of a number (from trigonometry). +<TR><TD><A NAME="g224"></A><CODE>sqrt</CODE><TD>Return the square root of a number. +<TR><TD><CODE>square</CODE><TD>Not a primitive! <CODE>(define (square x) (* x x))</CODE> +<TR><TD><CODE>trace</CODE><TD>Report on all future invocations of a procedure. +<TR><TD><CODE>untrace</CODE><TD>Undo the effect of <CODE>trace</CODE>. +<TR><TD><CODE>vector</CODE><TD>Create a vector with the arguments as elements. +<TR><TD><CODE>vector->list</CODE><TD>Return a list with the same elements as the vector. +<TR><TD><CODE>vector-length</CODE><TD>Return the number of elements in a vector. +<TR><TD><CODE>vector-ref</CODE><TD>Return an element of a vector (counting from zero). +<TR><TD><CODE>vector-set!</CODE><TD>Replace an element in a vector. +<TR><TD><CODE>vector?</CODE><TD>Is the argument a vector? +<TR><TD><CODE>vowel?</CODE><TD>Not a primitive! <CODE>(define (vowel? x) (member? x '(a e i o u)))</CODE> +<TR><TD><CODE>word</CODE><TD>Joins words into one big word. +<TR><TD><CODE>word?</CODE><TD>Is the argument a word? (Note: numbers are words.) +<TR><TD><CODE>write</CODE><TD>Print the argument in machine-readable form (see +<A HREF="../ssch22/files.html#spwrite">here</A>). +</TABLE> + +<HR> +<P><A HREF="../ss-toc2.html">(back to Table of Contents)</A><P> +<A HREF="credits.html"><STRONG>BACK</STRONG></A> +chapter thread <A HREF="glossary.html"><STRONG>NEXT</STRONG></A> + +<P> +<ADDRESS> +<A HREF="../index.html">Brian Harvey</A>, +<CODE>bh@cs.berkeley.edu</CODE> +</ADDRESS> +</BODY> +</HTML> |