1 / 5

Exploring Higher Order Functions in Computing: Insights from UC Berkeley's CS10 Course

Dive into the fascinating world of higher-order functions with UC Berkeley's CS10 lecture. In this session, Lecturer Dan Garcia highlights the significance of functions as data, showcasing how higher-order functions (HOFs) can be effectively utilized. Learn about key concepts like mapping, filtering, and reducing lists, as well as the growing demand for coding proficiency in today's digital marketplace. Embrace the beauty and joy of computing while discovering useful HOFs that empower your programming journey!

jett
Télécharger la présentation

Exploring Higher Order Functions in Computing: Insights from UC Berkeley's CS10 Course

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS10 : The Beauty and Joy of ComputingLecture #18Higher Order Functions I 2012-04-02 UC Berkeley EECSLecturer SOEDan Garcia The market for classes in coding (esp focused on the Internet) is booming, so says the NY Times. Codeacademy is one of the biggest sites; CS10 is a great first step!! (Image Credit: New York Times) Coding is cool again! http://www.nytimes.com/2012/03/28/technology/for-an-edge-on-the-internet-computer-code-gains-a-following.html

  2. Today • Functions as Data • Higher-Order Functions • Useful HOFs (you can build your own!) • map Reporter over List • Report a new list, every element E of Listbecoming Reporter(E) • keep items such that Predicate from List • Report a new list, keeping only elements Eof List if Predicate(E) • combine with Reporter over List • Combine all the elements of List with Reporter(E) • This is also known as “reduce” • Acronym example • keep  map  combine

  3. combine with Reporter over List a b c d

  4. Peer Instruction I understand higher-order functions. • Strongly disagree • Disagree • Neutral • Agree • Strongly agree

  5. Summary • Functions as data is one of the two (programming) big ideas in this course • It’s a beautiful example of the abstraction of the list iteration details • Google (and other companies) use this! • They use “map-reduce” (Image Credit: Simply Scheme by Brian Harvey & Matt Wright) (Credit: Geekologie)

More Related