Lecture #14 Programming Languages MISHRA 95

G22.2210

Programming Languages: PL

B. Mishra
New York University.


Lecture # 14

---Slide 1---
MATHEMATICA: History

---Slide 2---
Features

---Slide 3---
Numerical Programming

---Slide 4---
Example

---Slide 5---
Symbolic Programming

---Slide 6---
Symbolic Programming (Contd)

---Slide 7---
Data Structure: LIST

---Slide 8---
List Operations

---Slide 9---
List Operations

---Slide 10---
Assignments: Immediate

---Slide 11---
Assignments: Delayed

---Slide 12---
Delayed Assignment

---Slide 13---
Procedural Programming: Conditionals

---Slide 14---
Procedural Programming: Loops

---Slide 15---
Examples

---Slide 16---
Defining Your Own Iterator: Until

---Slide 17---
Functional Programming

---Slide 18---
Example: PowerSet

    CopyPut[l_List, x_] :=
      Join[l, Table[
              Append[l[[i]], x], {i, Length[l]}
      ]]

    PowerSet[l_List] := Fold[CopyPut, {{}}, l]

    PowerSet[{a, b, c}]
=>  {{}, {a}, {b}, {a, b},
     {c}, {a, c}, {b, c}, {a, b, c}}

---Slide 19---
Procedural vs. Functional Programming

---Slide 20---
Pattern Matching

---Slide 21---
Stylistic Remarks

---Last Slide---
Final Remarks

[End of Lecture #14]