about summary refs log tree commit diff stats
path: root/config.mk
Commit message (Expand)AuthorAgeFilesLines
* fixed a type in README, and patched config.mkarg@10ksloc.org2006-08-021-1/+1
* removed the CONFIG variable from config.mk, renamed config.h into config.defa...arg@10ksloc.org2006-08-021-5/+2
* applied Sanders patches (numlock2)arg@10ksloc.org2006-08-021-7/+7
* uppercasing all define'd values (uppercase-prefixed should only be enum field...arg@10ksloc.org2006-08-011-7/+7
* centralized/externalized configuration to config.harg@10ksloc.org2006-08-011-2/+5
* applied Sanders patchesarg@10ksloc.org2006-08-011-15/+9
* s/0.5/0.6/ - my steps are wider than the realityarg@10ksloc.org2006-07-211-1/+1
* preparing 0.6 which will be available in the evening after sanders patch approx.arg@10ksloc.org2006-07-211-6/+6
* using double-linked list in order to get correct prev focus handlingarg@10ksloc.org2006-07-201-5/+5
* cleaned up codearg@10ksloc.org2006-07-201-1/+1
* using O3 instead of Os, binary size still < 40kbarg@10ksloc.org2006-07-201-1/+1
* applied Jukka's patch with s/ModKeyMask/MODKEY/garg@10ksloc.org2006-07-191-1/+1
* changed CFLAGsarg@mmvi2006-07-181-5/+5
* simplified MakefileAnselm R. Garbe2006-07-171-1/+0
* patched dwmAnselm R. Garbe2006-07-171-1/+1
* simplified man pageAnselm R. Garbe2006-07-161-1/+1
* draw bar on exposure ;)Anselm R. Garbe2006-07-141-5/+5
* prep 0.1 0.1Anselm R. Garbe2006-07-141-6/+6
* implemented dwm reading status text from stdin Anselm R. Garbe2006-07-141-5/+5
* continued with man pageAnselm R. Garbe2006-07-141-2/+5
* new stuffAnselm R. Garbe2006-07-131-1/+1
* added logo+descriptionAnselm R. Garbe2006-07-131-6/+2
* new stuff (some warning elimination)Anselm R. Garbe2006-07-131-2/+7
* new stuff, fixed several issuesAnselm R. Garbe2006-07-121-1/+1
* added grid mode on Mod1Mask gAnselm R. Garbe2006-07-121-1/+1
* added new stuffAnselm R. Garbe2006-07-101-3/+1
* initial importAnselm R. Garbe2006-07-101-0/+29
span>="http://www.cs.berkeley.edu/~bh/">Brian Harvey</A><BR><A HREF="http://www.cnmat.berkeley.edu/~matt">Matthew Wright</A><BR>University of California, Berkeley</CITE> <BR><BR><A HREF="http://www-mitpress.mit.edu/book-home.tcl?isbn=0262082810">MIT Press web page for Simply Scheme</A> </TABLE> <P><A HREF="simply-toc.html">(back to Table of Contents)</A> <HR> <P>By now you're accustomed to the idea of expressing a computational process in terms of the function whose value you want to compute, rather than in terms of a sequence of actions. But you probably think of a function (or the procedure that embodies it) as something very different from the words, sentences, numbers, or other data that serve as arguments to the functions. It's like the distinction between verbs and nouns in English: A verb represents something <EM>to do,</EM> while a noun represents something <EM>that is.</EM> <P>In this part of the book our goal is to overturn that distinction. <P>Like many big ideas, this one seems simple at first. All we're saying is that a function can have <EM>functions</EM> as its domain or range. One artificially simple example that you've seen earlier was the <CODE>number-of-arguments</CODE> function in Chapter 2. That function takes a function as argument and returns a number. It's not so different from <CODE>count</CODE>, which takes a word or sentence as argument and returns a number. <P>But you'll see that this idea leads to an enormous rise in the length and complexity of the processes you can express in a short procedure, because now a process can give rise to several other processes. A typical example is the <CODE>acronym</CODE> procedure that we introduced in Chapter 1 and will examine now in more detail. Instead of applying the <CODE>first</CODE> procedure to a single word, we use <CODE>first</CODE> as an argument to a procedure, <CODE>every</CODE>, that automatically applies it to every word of a sentence. A single <CODE>every</CODE> process gives rise to several <CODE>first</CODE> processes. <P>The same idea of function as data allows us to write procedures that create and return new procedures. At the beginning of Part II we showed a Scheme representation of a function that computes the third person singular of a verb. Now, to illustrate the idea of function as data, we'll show how to represent in Scheme a function <CODE>make-conjugator</CODE> whose range is <EM>the whole family</EM> of verb-conjugation functions: <PRE> (define (make-conjugator prefix ending) (lambda (verb) (sentence prefix (word verb ending)))) </PRE> <P>Never mind the notation for now; the idea to think about is that we can use <CODE>make-conjugator</CODE> to create many functions similar to the <CODE>third-person</CODE> example of the Part II introduction: <PRE> > (define third-person (make-conjugator 'she 's)) > (third-person 'program) (SHE PROGRAMS) > (define third-person-plural-past (make-conjugator 'they 'ed)) > (third-person-plural-past 'play) (THEY PLAYED) > (define second-person-future-perfect (make-conjugator '(you will have) 'ed)) > (second-person-future-perfect 'laugh) (YOU WILL HAVE LAUGHED) </PRE> <P>We'll explore only a tiny fraction of the area opened up by the idea of allowing a program as data. Further down the same road is the study of <EM>compilers</EM> and <EM>interpreters,</EM> the programs that translate your programs into instructions that computers can carry out. A Scheme compiler is essentially a function whose domain is Scheme programs. <P><A HREF="simply-toc.html">(back to Table of Contents)</A> </BODY> </HTML>