Scheme Flashcards
(77 cards)
What is the parent language of Scheme?
Lisp
Who were the creators of Scheme?
Gerald Jay Sussman and Guy L. Steele Jr.
What’s the name of the influential textbook that solidified Scheme’s place in computer science education?
Structure and Interpretation of Computer Programs (SICP)
What notation does Scheme use for operators?
Prefix notation (Polish notation)
What is the purpose of the car function?
It returns the first element of a list.
What is the purpose of the cdr function?
It returns all elements of a list except the first one.
What does the lambda keyword do?
Creates an anonymous function
Identify the Scheme construct that allows creating local variables:
let
Identify the Scheme function that allows you to combine multiple expressions to be evaluated in sequence:
begin
Identify the Scheme feature that enables defining new functions:
define
Identify the Scheme control structure used for multi-way conditional branching:
cond
Identify the Scheme construct that enables mutation of variables:
set!
Identify the Scheme function used to check if an item is a member of a list:
member
Identify the Scheme feature that made it different from other Lisp dialects in its early days:
Lexical scoping
Identify the Scheme construct used to read user input:
read
True or False. Scheme supports both dynamic and static typing.
False - Scheme is dynamically typed
True or False. In Scheme, parentheses are optional when calling functions.
False - parentheses are required
True or False. The car and cdr functions are used for list manipulation in Scheme.
True
True or False. In Scheme, variables must be declared with an explicit type.
False
True or False. Hygienic macros were introduced to make macro expansions safer and more predictable.
True
True or False. Scheme uses curly braces {} to define function bodies.
False - it uses parentheses
True or False. Scheme supports first-class functions, meaning functions can be passed as arguments
True