Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Functional Python!
You have completed Functional Python!
Preview
Functional programming has some pretty important central rules that we should understand.
The rules
- Computation is the evaluation of functions
- Programming is done with expressions
- No side-effects from computation
- Functions are first-class citizens
- Functions should be limited in scope and functionality
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
The first two are pretty straightforward.
0:00
Computation is
the evaluation of functions.
0:00
This means that we do our work computing
values and outcomes all in functions.
0:04
We'll try to keep as much of our work
inside of discrete functions as possible.
0:08
To me,
this is easiest to think of as math.
0:13
When we're just talking about it, we take
two and combine it with another two, and
0:15
we get four.
0:18
But in programming we'd be using
an add function that takes
0:19
at least two arguments.
0:22
That function then sends back the four.
0:24
So our computation was done by
evaluating the add function.
0:26
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up