* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Programming Languages
Survey
Document related concepts
Abstraction (computer science) wikipedia , lookup
Go (programming language) wikipedia , lookup
Reactive programming wikipedia , lookup
C Sharp (programming language) wikipedia , lookup
Name mangling wikipedia , lookup
Recursion (computer science) wikipedia , lookup
Structured programming wikipedia , lookup
Dirac delta function wikipedia , lookup
Corecursion wikipedia , lookup
Object-oriented programming wikipedia , lookup
APL syntax and symbols wikipedia , lookup
Falcon (programming language) wikipedia , lookup
Standard ML wikipedia , lookup
Transcript
Programming Languages Meeting 9 October 28/29, 2014 More Lists From last time, continuing with the formal approach to functional programming • Objects – Atoms – Lists of objects – The symbol called bottom, signifying “undefined” • Functions on the set of objects, the only operation on objects – Partial – Entire Atoms • Forms of atoms – sequence of characters, a string, an identifier – sequence of digits, an integer [perhaps with sign] – syntax of a real number – T, meaning true – F, meaning false – ϕ, the symbol representing the empty list Notation • One line function specification with choices, developed by John Backus • Symbols : apply the function to the argument is defined as −> if – then ; else Functional Programming Language Four components 1. Objects 2. Primitive functions 3. Functional forms 4. Function definition mechanism, for secondary functions Primitives Our set of primitives: • first • last • head • tail • atom? • nil? • list? For next time 1. Using the primitives and functionals, define concat, a function that concatenates two lists. 2. Using the primitives and functionals, define reverse, a function that produces a list in the reverse order from its argument 3. Install LispWorks 6.1.1 Personal Edition from lispworks.org 4. Explore LispWorks and define our primitives in this system.