Stop show with sound -- Keyboard shortcut: 'x'  Next slide in show -- Keyboard shortcut: 'n'  2 minutes, 12 secondsExpressions, Types, and Functions - slide 37 : 46

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
(#<procedure> #<procedure>)

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")))
"<frameset><frame src = \"sss\"></frameset>"