text: 8.14
  
  ### Lecture 21: Mutual recursionðŸ”—
  
  This assignment is due on Sunday, November 3 at 11:59pm. Submit it using Handin as assignment lecture21.
  
  #### 1Mutually recursive dataðŸ”—
  
   ; A TwoTree is one of: ; - Number ; - (make-two ThreeTree ThreeTree) (define-struct two [first second]) ; A ThreeTree is one of: ; - Number ; - (make-three TwoTree TwoTree TwoTree) (define-struct three [first second third])
  
  Exercise 1. Write 3 more examples of TwoTrees and ThreeTrees. Call the TwoTrees two1 two2 two3. Call the ThreeTrees three1 three2 three3.
  
  Exercise 2. Design two functions: one called sum-twotree that sums all the numbers in a TwoTree, and one called sum-threetree that sums all the numbers in a ThreeTree.
  
  Exercise 3. Design a function add-to-twotree that adds a given number to all the numbers in a given TwoTree and a function add-to-threetree that adds a given number to all the numbers in a given ThreeTree.
  
  #### 2Mutual recursion with listsðŸ”—
  
   ; A FamilyTree is (make-ft String ;                          Number ;                          [ListOf FamilyTree]) (define-struct ft [name age children]) ; A [ListOf FamilyTree] is one of: ; - empty ; - (cons FamilyTree [ListOf FamilyTree])
  
  Exercise 4. Design a function count-ft that counts all the people in a given FamilyTree and a function count-loft that counts all the people in a given [ListOf FamilyTree]. Can you do it using foldr?
  
  Exercise 5. Design a function growup-ft that adds 1 to the ages of all the people in a given FamilyTree and a function growup-loft that adds 1 to the ages of all the people in a given [ListOf FamilyTree]. Can you do it using map?
explanation: The document is a lecture assignment on mutual recursion, containing several exercises that require designing functions and data structures. It does not contain a single math question or a question and answer, but rather a series of programming exercises.
distilabel_metadata.content: Evaluate the user given text extract and determine if it contains a math question and optionally and answer to this question.
  
  Output rules:
  
  1. Briefly describe the document and mention if it contains a question or a question and answer.
  2. Finalize the output with: Label: no-question,question,question-and-answer,multiple-question,multiple-question-and-answer
distilabel_metadata.role: system
distilabel_metadata.content: 8.14
  
  ### Lecture 21: Mutual recursionðŸ”—
  
  This assignment is due on Sunday, November 3 at 11:59pm. Submit it using Handin as assignment lecture21.
  
  #### 1Mutually recursive dataðŸ”—
  
   ; A TwoTree is one of: ; - Number ; - (make-two ThreeTree ThreeTree) (define-struct two [first second]) ; A ThreeTree is one of: ; - Number ; - (make-three TwoTree TwoTree TwoTree) (define-struct three [first second third])
  
  Exercise 1. Write 3 more examples of TwoTrees and ThreeTrees. Call the TwoTrees two1 two2 two3. Call the ThreeTrees three1 three2 three3.
  
  Exercise 2. Design two functions: one called sum-twotree that sums all the numbers in a TwoTree, and one called sum-threetree that sums all the numbers in a ThreeTree.
  
  Exercise 3. Design a function add-to-twotree that adds a given number to all the numbers in a given TwoTree and a function add-to-threetree that adds a given number to all the numbers in a given ThreeTree.
  
  #### 2Mutual recursion with listsðŸ”—
  
   ; A FamilyTree is (make-ft String ;                          Number ;                          [ListOf FamilyTree]) (define-struct ft [name age children]) ; A [ListOf FamilyTree] is one of: ; - empty ; - (cons FamilyTree [ListOf FamilyTree])
  
  Exercise 4. Design a function count-ft that counts all the people in a given FamilyTree and a function count-loft that counts all the people in a given [ListOf FamilyTree]. Can you do it using foldr?
  
  Exercise 5. Design a function growup-ft that adds 1 to the ages of all the people in a given FamilyTree and a function growup-loft that adds 1 to the ages of all the people in a given [ListOf FamilyTree]. Can you do it using map?
distilabel_metadata.role: user
distilabel_metadata.raw_output_q_a_detector_0: The document is a lecture assignment on mutual recursion, containing several exercises that require designing functions and data structures. It does not contain a single math question or a question and answer, but rather a series of programming exercises.
  
  Label: multiple-question