links · people · groups · tags | My: links · tags · groups · watchlists · notes login · sign up now! | help · blog
Simpy simpy
 
Michael Shook, member since May 27, 2004
.
Search Everyone: "scheme",

Top "scheme" experts: pablomarx, davidlittllefair, dmj111, vijucat, simpydan, airpocket,

Groups about "scheme": Car Insurance, Panama City Real Estate ,

11 - 15 of 15 « previous   Watch mshook
 
(define (eval exp env)
  (cond ((self-evaluating? exp) exp)
        ((variable? exp) (lookup-variable-value exp env))
        ((quoted? exp) (text-of-quotation exp))
        ((assignment? exp) (eval-assignment exp env))
        ((definition? exp) (eval-definition exp env))
        ((if? exp) (eval-if exp env))
        ((lambda? exp)
         (make-procedure (lambda-parameters exp)
                         (lambda-body exp)
                         env))
        ((begin? exp) 
         (eval-sequence (begin-actions exp) env))
        ((cond? exp) (eval (cond->if exp) env))
        ((application? exp)
         (apply (eval (operator exp) env)
                (list-of-values (operands exp) env)))
        (else
         (error "Unknown expression type -- EVAL" exp))))
  • http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-26.html
by mshook 2009-05-16 17:56 sicp · eval · lisp · scheme · code · 16 · may · 2009 · b
http://mshook.googlepages.com/d4m.htm?/mshook/16+may+2009+b - cached - mail it - history
by mshook 2009-05-16 16:32 saved · stirling · engine · design · pdf · via · scheme
http://www.scribd.com/doc/2430599/Don-Clucas-Stirling-engine-generator-development - cached - mail it - history
We want to write a function that generates accumulators-- a function that takes a number n, and returns a function that takes another number i and returns n incremented by i.

JavaScript

function foo(n) { return function (i) { return n += i } }

Scheme

(define (foo n) (lambda (i) (set! n (+ n i)) n))

Try

JavaScript

function main() { function foo (n) { return function (i) { return n += i } } ; a = foo(5); print(a(1)); print("n"); print(a(4)); }

Scheme

(define (foo n) (lambda (i) (set! n (+ n i)) n)) (define a (foo 5)) (a 1) (a 4)
by mshook 2009-05-16 14:30 lisp · scheme · javascript · 16 · may · 2009 · a · example · code · theory · comparison · good · closure
http://mshook.googlepages.com/d4m.htm?/mshook/16+may+2009+a - cached - mail it - history
(I wrote this article to help myself understand exactly what McCarthy discovered. You don't need to know this stuff to program in Lisp, but it should be helpful to anyone who wants to understand the essence of Lisp-- both in the sense of its origins and its semantic core. The fact that it has such a core is one of Lisp's distinguishing features, and the reason why, unlike other languages, Lisp has dialects.)

In 1960, John McCarthy published a remarkable paper in which he did for programming something like what Euclid did for geometry. He showed how, given a handful of simple operators and a notation for functions, you can build a whole programming language. He called this language Lisp, for "List Processing," because one of his key ideas was to use a simple data structure called a list for both code and data.

by mshook 2009-05-15 22:59 lisp · why · theory · history · 1950s · scheme · recursion
http://www.paulgraham.com/rootsoflisp.html - cached - mail it - history
Experimental, built on Google App Engine
by mshook 2009-04-14 14:31 scheme · ruby · gae · javascript · cli · experiment · viapopular
http://lotrepls.appspot.com/ - cached - mail it - history
11 - 15 of 15 « previous  
Related Tags
 
- exclude ~ optional + require
Add Dates