Ejercicio:   Ejercicio:   Contratos y Ejemplos Coincidentes

Ejercicio: Ejercicio: Contratos y Ejemplos Coincidentes

Direcciones: Haga coincidir cada ejemplo a la izquierda con el contrato a la derecha. NOTA: Múltiples ejemplos puede coincidir con el mismo contrato!
  •  

    (EXAMPLE (match 30 "red")
             (+ 30 (string-length "red")))
     
     

    ; match : image -> image

  •  

    (EXAMPLE (match 10 "blue")
             (+ 10 (string-length "blue")))
     
     

    ; match : number string -> number

  •  

    (EXAMPLE (match (abs -4) "45")
              4)
     
     

    ; match : number image -> image

  •  

    (EXAMPLE (match (triangle 20 "solid" "blue") 
                    3)
             (scale 3 (triangle 20 "solid"
                                   "blue")))
     
     

    ; match : image number -> image

  •  

    (EXAMPLE (match (circle 10 "solid" "orange") 
                    22)
             (scale 22 
                    (circle 10 "solid" "orange")))
     
     

  •  

    (EXAMPLE (match 5 (star 20 "solid" "red"))
             (rotate (- 90 5) 
                     (star 20 "solid" "red")))
     
     

  •  

    (EXAMPLE (match (circle 20 "outline" "gold"))
             (rotate 37 (circle 20 "outline" 
                                  "gold")))
     
     

  •  

    (EXAMPLE (match (circle 10 "solid" "green"))
             (rotate 37 
                     (circle 10 "solid" "green")))
     
     

 
These materials are OUT OF DATE! To get the latest version of the materials, visit https://www.BootstrapWorld.org/materials