kesava / eopl Goto Github PK
View Code? Open in Web Editor NEWSolutions for Essentials of Programming Languages by Daniel P. Friedman, Mitchell Wand, and Christopher T. Haynes
Home Page: http://www.eopl3.com/
Solutions for Essentials of Programming Languages by Daniel P. Friedman, Mitchell Wand, and Christopher T. Haynes
Home Page: http://www.eopl3.com/
Hey, great job starting with the first edition!
Have heard that three editions are three distinct books.
Yet to get into 2nd and 3rd editions but I was working on Chapter 2 of the first one.
I came across the tough cookie that is 2.2.9 and was comparing my results with yours.
These tests on yours seem to give wrong answer on Exercise 2.2.9:
> (car&cdr 'a '() 'fail)
'(lambda (x) ())
> (car&cdr 'a '(() ((a))) 'fail)
'(lambda (x) (car (car (car ()))))
> (car&cdr 'a '(() (a)) 'fail)
'(lambda (x) (car (car ())))
> (car&cdr 'a '(() (b) a) 'fail)
'(lambda (x) (car (cdr ())))
> (car&cdr 'a '(b c d () e (a)) 'fail)
'(lambda (x) (car (car (cdr (cdr cdr)))))
> (car&cdr 'a '(() () a) 'fail)
. . car: contract violation
expected: pair?
given: '()
Executing:
(lexical-address '(lambda (x y z) (x (y z))))
gives
=> '(lambda (x y z) ((x : 0 0) (y : 0 1) (z : 0 2)))
which loses the context of application of (x (y z))
Also, single variable functions have an extra bracket around them:
(lexical-address '(lambda (x) x))
gives => '(lambda (x) ((x : 0 0)))
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.