COMP 302 Lecture Notes - Lecture 11: Functional Programming, Local Variable, Semicolon

27 views6 pages

Document Summary

We have been talking about functional programming in the pure style . No updatable variables; once you associate a name with a value, it is bound to keep that value forever. We are more used to an imperative paradigm, where it consists of a sequence of instructions/order that the computer must execute. Today, we will introduce this more formally, in an abstract and high-level perspective to see what we are learning in more context. Basic computational engine of standard pure functional programming: key words. Expressions are the basic unit with which you work. Until now, we have only seen expressions (no commands). The end result of evaluation is it produces a value , which is a special kind of expression which doesn"t require further evaluation. Example: (fun x -> x) (wic) -> inc. This is an expression where one higher order expression ( (fun x -> x) ) is being applied to another function ( (wic) ).

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents