s c h e m e w i k i . o r g
/ Scm.MatchByName
Edit
|
Attach
|
Ref'd By
|
Printable
|
More
|
Advanced Search
| Full Text
Topic Name
This Web
WebHome
WebChanges
WebTopicList
WebStatistics
All Webs
Chicken
Cookbook
Erlang
Know
Main
Plugins
Sandbox
Scm
TWiki
Schematics
Schematics Home
TWiki Shorthand
Offsite Links
Schemers.org
Lambda the Ultimate
twiki.org
;; tested in PLT Scheme 300.3 (require (lib "plt-match.ss"))
(define-struct expr (srcloc)) (define-struct (id expr) (name)) (define-struct (lam expr) (arg body)) (define-struct (app expr) (rator rand))
;; incomplete evaluator (define (eval e r) ;; expr, environment (as alist) (match e [(? id? (app id-name name)) (cdr (assq name r))] [(? app? (app app-rand rand) (app app-rator (? lam? (app lam-arg arg) (app lam-body body)))) (eval body (cons (cons arg rand) r))]))
Current Rev: r1.1 - 01 Jan 2006 - 19:07 GMT -
RichardCobbe
, Revision History:
Diffs
| r1.1
© 2004 by the contributing authors. / You are Main.guest