Consider this FLANG code:
What must be true of THING?
(Choose the best answer.)
We briefly discussed de Brujin Indexing in lecture. In the program below, how would we convert this to a program that uses de Brujin Indices?
{with 4 {with 7 {with 2 {- [0] [1] [2]}}}}
{with 2 {with 7 {with 4 {- [0] [1] [2]}}}}
{with 4 {with 7 {with 2 {- [2] [1] [0]}}}}
{with 2 {with 7 {with 4 {- [2] [1] [0]}}}}
Which of the following is true about “first-class” functions?
Our FLANG language has higher-order functions rather than first-class functions.
First-class functions can be created at runtime.
First-class functions can be produced in C if the program uses function pointers in the arguments.
First-class functions must be bound to an identifier (be named) so we can use them.
First-order functions are synonymous with First-class functions.
Last week, we added functions to our language. The first shot we had at implementing the evaluation rules had:
Which of the following tests will throw an error for this implementation?
From the class notes, showing off some of the things that you can do with first-class functions:
How would you correctly call the above currify
function to add
two
numbers?
(currify add 1 2)
(currify (add 1 2))
((currify add) 1 2)
(((currify add) 1) 2)
((currify add) (1 2))
((currify add) (list 1 2))