Seite 1 von 1

additional test case for exercise 2 task 7

Verfasst: 27. Apr 2009 11:35
von Daniel S.
I was a little surprised, that my solution for task 7 finally works with the given test cases, so I made a slightly more complex test case:

Code: Alles auswählen

(test (interp (parse '{with {y {A}} {with {x {- y 25}} {f x {- y {f {- {f x 1} 1} {f 20 3}}}}}}) (list (fundef 'f '(x y) (parse '{+ x y})) (fundef 'A '() (parse '65)))) 42)
Happy testing

Re: additional test case for exercise 2 task 7

Verfasst: 27. Apr 2009 13:57
von sewe
Thanks for posting this. We really encourage posting test cases to the forum. Regardless of s-expressions, there are only so many programs in FWAE you can write before going insane. ;-)