The Beauty and Joy of Computing Lecture #19 Higher Order Functions II Instructor: Sean Morris Twitter Can Tell Whether Your Community Is Happy or Not www.theatlanticcities.com/neighborhoods/2013/07/how-twitter-can-predict-your-communitys-wellbeing/6270.

Slides:



Advertisements
Similar presentations
TWO STEP EQUATIONS 1. SOLVE FOR X 2. DO THE ADDITION STEP FIRST
Advertisements

Fill in missing numbers or operations
Slide 1 Insert your own content. Slide 2 Insert your own content.
1 Copyright © 2013 Elsevier Inc. All rights reserved. Chapter 116.
1 Copyright © 2010, Elsevier Inc. All rights Reserved Fig 2.1 Chapter 2.
1 Copyright © 2013 Elsevier Inc. All rights reserved. Chapter 28.
1 Copyright © 2013 Elsevier Inc. All rights reserved. Chapter 38.
1 Chapter 40 - Physiology and Pathophysiology of Diuretic Action Copyright © 2013 Elsevier Inc. All rights reserved.
By D. Fisher Geometric Transformations. Reflection, Rotation, or Translation 1.
Combining Like Terms. Only combine terms that are exactly the same!! Whats the same mean? –If numbers have a variable, then you can combine only ones.
Business Transaction Management Software for Application Coordination 1 Business Processes and Coordination.
Chapter 3: Top-Down Design with Functions Problem Solving & Program Design in C Sixth Edition By Jeri R. Hanly & Elliot B. Koffman.
Combining Like Terms. Only combine terms that are exactly the same!! Whats the same mean? –If numbers have a variable, then you can combine only ones.
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Title Subtitle.
0 - 0.
ALGEBRAIC EXPRESSIONS
DIVIDING INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
MULTIPLYING MONOMIALS TIMES POLYNOMIALS (DISTRIBUTIVE PROPERTY)
ADDING INTEGERS 1. POS. + POS. = POS. 2. NEG. + NEG. = NEG. 3. POS. + NEG. OR NEG. + POS. SUBTRACT TAKE SIGN OF BIGGER ABSOLUTE VALUE.
SUBTRACTING INTEGERS 1. CHANGE THE SUBTRACTION SIGN TO ADDITION
MULT. INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
Addition Facts
1 Learning Touchmath *Graphics taken from
Year 6 mental test 10 second questions Numbers and number system Numbers and the number system, fractions, decimals, proportion & probability.
CS4026 Formal Models of Computation Running Haskell Programs – power.
ZMQS ZMQS
1 Foundations of Business In order to appreciate and make informed decisions in the world around them, students will need to establish a basic business/economic.
When I’m at work: Solving problems.
BT Wholesale October Creating your own telephone network WHOLESALE CALLS LINE ASSOCIATED.
O X Click on Number next to person for a question.
© S Haughton more than 3?
5.9 + = 10 a)3.6 b)4.1 c)5.3 Question 1: Good Answer!! Well Done!! = 10 Question 1:
Area of triangles.
Difference, Product and Quotient Functions
Determining if a Triangle is Possible
Twenty Questions Subject: Twenty Questions
Linking Verb? Action Verb or. Question 1 Define the term: action verb.
Energy & Green Urbanism Markku Lappalainen Aalto University.
Lets play bingo!!. Calculate: MEAN Calculate: MEDIAN
Past Tense Probe. Past Tense Probe Past Tense Probe – Practice 1.
1 Advanced Archive-It Application Training: Quality Assurance October 17, 2013.
8-3 Factoring x2 + bx + c Warm Up Lesson Presentation Lesson Quiz
1 First EMRAS II Technical Meeting IAEA Headquarters, Vienna, 19–23 January 2009.
Addition 1’s to 20.
25 seconds left…...
EC-111 Algorithms & Computing Lecture #11 Instructor: Jahan Zeb Department of Computer Engineering (DCE) College of E&ME NUST.
Test B, 100 Subtraction Facts
Doubles Facts Doubles with Pictures Doubles without Pictures Pictures Only.
Performance Tuning for Informer PRESENTER: Jason Vorenkamp| | October 11, 2010.
11 = This is the fact family. You say: 8+3=11 and 3+8=11
Week 1.
Number bonds to 10,
Market Research Lesson 3 0. Check in: Share App Ideas What app ideas are you working with from your brainstorm? Which one are you leaning toward? 1.
Warm UP September 9, 2013 Explain one thing you know about measurement and mass. Next on page 15 of your notebook begin setting up Cornell notes with todays.
We will resume in: 25 Minutes.
1 Ke – Kitchen Elements Newport Ave. – Lot 13 Bethesda, MD.
Lecture 15 Functions CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
Bottoms Up Factoring. Start with the X-box 3-9 Product Sum
1 Unit 1 Kinematics Chapter 1 Day
O X Click on Number next to person for a question.
TASK: Skill Development A proportional relationship is a set of equivalent ratios. Equivalent ratios have equal values using different numbers. Creating.
Number Bonds to = = = = = = = = = = = 20.
X2+y2x2+y2 x 2 +y 2 +Dx+Ey+F = 0x2+y2x2+y2 General Form x 2 +y 2 +Dx+Ey+F = 0 (a) How do we identify the equations of circles? The coefficients of x 2.
Primary school Horvati w 3/26/2015copyright
5A Questioning techniques, p 20
The Beauty and Joy of Computing Lecture #18 Higher Order Functions I Instructor: Sean Morris
CS10 The Beauty and Joy of Computing Lecture #17 Higher Order Functions I Silicon (normally what processors are made of) is rigid and expensive,
The role of data mining in the last presidential election. A mind-blowing piece on how the Obama campaign used various sources of data to target voters.
Presentation transcript:

The Beauty and Joy of Computing Lecture #19 Higher Order Functions II Instructor: Sean Morris Twitter Can Tell Whether Your Community Is Happy or Not "training," "gym," "waves," "mountains," "camping", "ideas," "suggestions," "advice," "meetings," "conferences," "support," "donate"

UC Berkeley The Beauty and Joy of Computing : Higher-Order Functions II (2) Garcia Review useful HOFs map Reporter over List Report a new list, every element E of List becoming Reporter(E) keep items such that Predicate from List Report a new list, keeping only elements E of 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 The script, run and launch For each Compose example Today

UC Berkeley The Beauty and Joy of Computing : Higher-Order Functions II (3) Garcia Pair this out … Composing Higher-Order Functions, report this…

UC Berkeley The Beauty and Joy of Computing : Higher-Order Functions II (4) Garcia What would this report: a) UCB, as before b) UoCaB c) UCaB d) UoCB e) Something else Peer Instruction

UC Berkeley The Beauty and Joy of Computing : Higher-Order Functions II (5) Garcia Pair this out … What does the Sprite do? a)Say :,, b)Say : Tweet 1, Tweet 1, Tweet 1 c)Say : Tweet 3, Tweet 3, Tweet 3 d)Say : Tweet 1, Tweet 2, Tweet 3

UC Berkeley The Beauty and Joy of Computing : Higher-Order Functions II (6) Garcia Go Deep … What makes for each a High-Order Function?

UC Berkeley The Beauty and Joy of Computing : Higher-Order Functions II (7) Garcia Go Deeper … Explain the difference between the Higher- Order function, map, and the Higher-Order function for each.

UC Berkeley The Beauty and Joy of Computing : Higher-Order Functions II (8) Garcia Higher-Order Functions so far… Consumers of functions …

UC Berkeley The Beauty and Joy of Computing : Higher-Order Functions II (9) Garcia Cascade: Pair this out What is reported? a)2 b)16 c)60 d)80

UC Berkeley The Beauty and Joy of Computing : Higher-Order Functions II (10) Garcia Cascade: Check it out

UC Berkeley The Beauty and Joy of Computing : Higher-Order Functions II (11) Garcia Compose: Pair this out What does the Sprite say? a)Nothing b)Build Your Own Blocks c)Build d)Your e)Own f)Blocks

UC Berkeley The Beauty and Joy of Computing : Higher-Order Functions II (12) Garcia Compose : Returning Functions Returns a function f(g(x))

UC Berkeley The Beauty and Joy of Computing : Higher-Order Functions II (13) Garcia Compose : Another Example

UC Berkeley The Beauty and Joy of Computing : Higher-Order Functions II (14) Garcia Compose : Try this … A screensaver? A circle starts with a radius of 1 cm and expands as a function of time – doubles its radius every second. Using compose, write the function that will calculate the circles area at any given time. What are the two functions?

UC Berkeley The Beauty and Joy of Computing : Higher-Order Functions II (15) Garcia Write your own : Try this …

UC Berkeley The Beauty and Joy of Computing : Higher-Order Functions II (16) Garcia Functions as data Lambda