[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Perform the weekly set up instructions for project 1, homework b.
Report (a) all the lisp functions you’ve written and (b) a file containing your deftest
s
and (c)
‘repl.txt’ coming from you
saving the REPL showing these all running.
Write LISP functions to implement the following:
(deftest !count-of () (test 3 (count-of 'a '(a b (c d a) (e a))))) (deftest !sum-of () (test 28 (sum-of '(1 2 (3 4 5) (6 7))))) (deftest !oddd-of () (test 4 (odd-of '(1 2 (3 4 5) (6 7)))))
Note for the above:
odd-of
there is a function call (oddp num)
that returns true if num
is an odd number.
(deftest !odd-arr () (test '(1 3 5 7) (odd-of '(1 2 (3 4 5) (6 7)))))
Load ‘1/b/boot.lisp’ into lisp and run (!generate1). To understand what is going on here, look at ‘1/b/grammars.lisp’.
Write a new set of rules into ‘0/b/grammars’ called *grammar3*
that describes different menus at Bits ’n Bites. No more than 5 rules.
Using those rules, generate
some meals.
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated on April 19, 2011 using texi2html 5.0.