UT Dallas CS 4337 - #Sebesta pl10e ch15 functional prog (71 pages)

Previewing pages 1, 2, 3, 4, 5, 33, 34, 35, 36, 67, 68, 69, 70, 71 of 71 page document View the full content.
View Full Document

#Sebesta pl10e ch15 functional prog



Previewing pages 1, 2, 3, 4, 5, 33, 34, 35, 36, 67, 68, 69, 70, 71 of actual document.

View the full content.
View Full Document
View Full Document

#Sebesta pl10e ch15 functional prog

26 views


Pages:
71
School:
University of Texas at Dallas
Course:
Cs 4337 - Organization of Programming Languages

Unformatted text preview:

Chapter 15 Functional Programming Languages Chapter 15 Topics Introduction Mathematical Functions Fundamentals of Functional Programming Languages The First Functional Programming Language LISP Introduction to Scheme Common LISP ML Haskell F Support for Functional Programming in Primarily Imperative Languages Comparison of Functional and Imperative Languages Copyright 2012 Addison Wesley All rights reserved 1 2 Introduction The design of the imperative languages is based directly on the von Neumann architecture Efficiency is the primary concern rather than the suitability of the language for software development The design of the functional languages is based on mathematical functions A solid theoretical basis that is also closer to the user but relatively unconcerned with the architecture of the machines on which programs will run Copyright 2012 Addison Wesley All rights reserved 1 3 Mathematical Functions A mathematical function is a mapping of members of one set called the domain set to another set called the range set A lambda expression specifies the parameter s and the mapping of a function in the following form x x x x for the function cube x x x x Copyright 2012 Addison Wesley All rights reserved 1 4 Lambda Expressions Lambda expressions describe nameless functions Lambda expressions are applied to parameter s by placing the parameter s after the expression e g x x x x 2 which evaluates to 8 Copyright 2012 Addison Wesley All rights reserved 1 5 Functional Forms A higher order function or functional form is one that either takes functions as parameters or yields a function as its result or both Copyright 2012 Addison Wesley All rights reserved 1 6 Function Composition A functional form that takes two functions as parameters and yields a function whose value is the first actual parameter function applied to the application of the second Form h f g which means h x f g x For f x x 2 and g x 3 x h f g yields 3 x 2 Copyright 2012 Addison Wesley All rights reserved



View Full Document

Access the best Study Guides, Lecture Notes and Practice Exams

Loading Unlocking...
Login

Join to view #Sebesta pl10e ch15 functional prog and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view #Sebesta pl10e ch15 functional prog and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?