COMPSCI 1JC3 Chapter Notes - Chapter 2: Partial Application

65 views3 pages

Document Summary

If you have a list and want to double each element to make a list of even numbers, the map function can carry this out: doubleelements list = map multbytwo list multbytwo x = 2 x. Map can be used to apply the function to all the items: allsafe = map dishwashersafe [ spoon , pizzabox ] this results in [true,false] therefore map dishwashersafe : list kitchenstuff -> list bool. Instead of creating a recipe for programmers to implement, the recipe is captured as function. Most common languages in industry are object-oriented languages, like java and c++ A book for software design was created, so that common patterns were named in a standard way, so developers after you, could know what you were trying to do. Design patterns implemented in functional languages can be implemented as functions themselves and often in a couple of lines. Functional languages treat functions the same way as variables.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents