          Lecture 2 - Page 37 : 46
 Functional Programming in SchemeExpressions, Types, and Functions * Lisp and Scheme Lisp Scheme * Expressions and values Expressions, values, and types Examples of expressions and their values Evaluation of parenthesized expressions Arithmetic expressions Equality in Scheme The read-eval-print loop * Types Types Type checking Static type checking An example of type checking Types in functional programming languages * Lists Proper lists Symbolic expressions and improper lists Practical list construction List functions Association lists Property lists Tables as lists of rows Programs represented as lists * Other Data Types Other simple types Vectors Strings * Definitions Definitions * Functions The function concept Lambda calculus Functions in Scheme Function objects Functions as first class values Anonymous functions Lambda expressions in Scheme Optional parameters of Scheme functions (1) Optional parameters of Scheme functions (2) Closures Function definition in Scheme Simple web-related functions (1) Simple web-related functions (2) Function exercises
 Functions as first class values
 A function object is a first class citizen
 A first class citizen is an entity which can be passed as parameter to functions, returned as a result from a function, and organized as parts of data structures

 ```1> (define toplevel-html-elements (list html frameset)) 2> overall-html-elements (# #) 3> ((cadr toplevel-html-elements) (frame 'src "sss")) (ast "frameset" ((ast "frame" () (src "sss") single)) () double) 4> (xml-render ((cadr toplevel-html-elements) (frame 'src "sss"))) ""```

A few interactions which illustrate the first class properties of function objects. We bind the variable toplevel-html-elements to the list of the two functions html and frameset. Both are HTML mirror functions defined in the LAML general library. We illustrate next that the value of the variable indeed is a list of two functions. Thus, we have seen that we can organized functions as elements in lists. The function cadr returns the second element of a list. It is equivalent to (compose car cdr), where compose is functional composition. In the third evaluation we apply the mirror function frameset on a single frame. The last interaction shows the HTML rendering of the this. xml-render is a function defined in the LAML general library.

 Foldoc: first class