COMPSCI 61A Lecture Notes - Lecture 6: Higher-Order Function, Firstclass, Operand

28 views1 pages
zogo39484755 and 6 others unlocked
COMPSCI 61A Full Course Notes
22
COMPSCI 61A Full Course Notes
Verified Note
22 documents

Document Summary

The fibonacci sequence (0, 1, 1 , 2 ,3, 5, 8, 13, ) Can be calculated by a computer using while loops. A function"s domain is the set of all inputs it might possibly take as arguments. A function"s range is the set of output values it might possibly return. A pure function"s behavior is the relationship it creates between input and output. Don"t repeat yourself (dry) - implement a process just once, but execute it many times. Find a common structure that allows for shared implementation assert , : throws an error with if. The common structure among functions may be a computational process rather than a number. A higher order function is a function that takes another function as an argument. Functions defined within other function bodies are bound to names in a local frame. Operator: an expression that evaluates to a function. Operand: an expression that evaluates to any value.

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