[plt-scheme] solution for exercise 11.2.4

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Mon Jun 9 18:33:06 EDT 2008

Let's assume you know that asymbol isn't a symbol but 'asymbol is one.

Step #4 is the construction of a template.

Question 1:

  how many clauses does the data def have? (how many clauses must the  
function def have?)
  how do you formulate the conditions in the function def that  
correspond to the respective clause in the data def?

-- Matthias







On Jun 9, 2008, at 6:29 PM, carlo ambrogio wrote:

>
> for example
>
> if i give these inputs:
>
> asymbol
>
> (cons asymbol empty)
>
> (cons (cons asymbol empty) empty)
>
> (cons (cons (cons asymbol empty) empty) empty)
>
> I should obtain respectively:
>
> 0
>
> 1
>
> 2
>
> 3
>
>
>
>
>
> _________________________________________________________________
> Scarica Windows Live, un mondo di programmi per te!
> http://get.live.com/_________________________________________________
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme



Posted on the users mailing list.