Expressions, Types, and Functions - slide 37 : 46 |
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>"