FP foundations & Scheme Flashcards
examples of imperative langurs
C, C++, Java and pascal
Von Neumann
What is functional programming based on
Mathematical functions
LISP ML Haskell
How is the evaluation order of mapping expressions controlled within mathematical foundations
Recursion and conditional expressions
What is the apply-to-all denoted by
Alpha
Lambda express is
A function specifies the params of a mapping expression
A term with no free variables is said to be
Closed
Also know. As combinators
Lambda calc does not provide built in support for what type of functions?
Multi-argument
What is the transformation for multi-arguments functions into higher order functions called?
Currying
Lists in LISP are stored a what type of data structure?
Linked list
Scheme is a dialect of…
LISP
What are four characteristics of scheme?
(1) simple syntax
(2) small size
(3) exclusive use of static scoping
(4) treating functions as first class entities
What does most scheme implementations employ?
An interpreter that runs a “Read Evan print” loop
How many parameters can the primitive functions of * and + have?
Zero or more
If * is given no param what does it return?
1
If + is given no param what does it return
0
How many parameters can - and / have?
Two or more
What’s is the keyword “define” used as?
Bind a name to the value of a variable
What does car return?
The first ELEMENT of a given list
What does cdr return?
Returns remains if the given list after a car is removed
What does cons do?
Concatenate the list
What does a dotted pair indicate?
This cell contains two atoms
What is the difference between eq? And equal?
Eq? True if two objects are equal through pointer comparison
Equal? Recursively compares two objects to determine if they are equal