Referenced from lesson Applying Functions
Consider the following contract:
text :: (str :: String, size :: Number, color :: String) -> Image
What is the Name of this function?
How may things are in this function’s Domain?
What is the type of this function’s first argument?
What is the name of this function’s second argument?
What is the Range of this function? .
Below, circle which expression is the correct application of this function, based on its contract.
-
text("Bootstrap:Data Science", "purple", 60)
-
text(circle(99, "solid", "green"))
-
text("red", 25, "Andrew")
-
text("Angela", 25, "purple")
These materials were developed partly through support of the National Science Foundation, (awards 1042210, 1535276, 1648684, and 1738598). Bootstrap:Data Science by Emmanuel Schanzer, Nancy Pfenning, Emma Youndtsmith, Jennifer Poole, Shriram Krishnamurthi, Joe Politz, Ben Lerner, Flannery Denny, and Dorai Sitaram with help from Eric Allatta and Joy Straub is licensed under a Creative Commons 4.0 Unported License. Based on a work at www.BootstrapWorld.org. Permissions beyond the scope of this license may be available by contacting schanzer@BootstrapWorld.org.