CSCI 316: Quiz 13 - Functional Programming Languages
Sign in to Google
to save your progress.
Learn more
* Indicates required question
Email
*
Your email
Last Name
*
Your answer
First Name
*
Your answer
Student Id
*
Your answer
In the mathematical sense, a function is best described as
*
1 point
A mapping from a domain to a range with no side effects
A sequence of imperative statements
A procedure that modifies global variables
A loop with a termination condition
A subprogram that may alter state
Which of the following is typically absent in pure functional languages?
*
1 point
Lists
Lambda expressions
Variables with mutable state
Recursion
Higher-order functions
The earliest functional programming language discussed in the chapter is
*
1 point
Haskell
Lisp
ML
Scheme
F#
Lisp programs are primarily composed of
*
1 point
Objects and methods
Prefix expressions and lists
Bytecode instructions
Pattern-matching clauses
Infix expressions
Which Lisp feature allows programs and data to have the same structure?
*
1 point
Strong typing
Homoiconicity
Currying
Static binding
Lazy evaluation
In Lisp, the fundamental data structure is the
*
1 point
Tree
Record
List
Vector
Array
Which operation constructs a new list by adding an element to the front?
*
1 point
append
list
car
cdr
cons
The Lisp function car returns
*
1 point
The first element of a list
The remainder of a list
The last element of a list
A Boolean value
The length of a list
The Lisp function cdr returns
*
1 point
The first element of a list
A numeric index
The last element
The remainder of the list after the first element
A copy of the list
Which Lisp evaluation rule ensures arguments are evaluated before function application?
*
1 point
Normal order
Lazy evaluation
Short-circuit evaluation
Applicative order
Partial evaluation
Scheme differs from early Lisp primarily in its emphasis on
*
1 point
Minimalism and lexical scoping
Object-orientation
Large standard libraries
Dynamic typing only
Numeric computation
In Scheme, anonymous functions are created using
*
1 point
let
define
lambda
apply
map
A function that takes another function as an argument or returns one is called
*
1 point
A higher-order function
A polymorphic function
A recursive function
A pure function
A curried function
Which Scheme construct is commonly used for local bindings?
*
1 point
begin
quote
set
assign
let
Common Lisp differs from Scheme in that it
*
1 point
Removes lists
Eliminates recursion
Uses only static typing
Forbids macros
Supports multiple programming paradigms
Which feature of Common Lisp allows compile-time code transformation?
*
1 point
Garbage collection
Dynamic typing
Closures
Macros
Currying
Meta Language (ML) is best characterized as
*
1 point
Object-oriented only
Statically typed with type inference
Untyped and lazy
Dynamically typed and imperative
Assembly-based
Pattern matching in ML is primarily used for
*
1 point
Memory management
Exception handling
Control flow and data decomposition
Concurrency
I/O operations
Haskell differs from ML primarily in its use of
*
1 point
Lazy evaluation
Strict evaluation
Macros
Explicit memory management
Dynamic typing
Lazy evaluation means that
*
1 point
Expressions are evaluated in advance
Evaluation order is undefined
Side effects are mandatory
Arguments are evaluated only when needed
All functions are evaluated at compile time
In Haskell, infinite data structures are possible primarily because of
*
1 point
Lazy evaluation
Strong typing
Currying
Pattern matching
Macros
F# is most closely associated with which platform?
*
1 point
LLVM
.NET
UNIX shell
Web browsers
JVM
F# is best described as
*
1 point
Assembly-like
Logic-based
Object-oriented only
Functional-first with imperative and OO features
Purely functional only
Which feature allows partial application of functions?
*
1 point
Memoization
Polymorphism
Currying
Macros
Reflection
A curried function
*
1 point
Accepts all arguments at once
Must be recursive
Requires dynamic typing
Accepts arguments one at a time
Cannot return another function
Which imperative language feature is inspired by functional programming?
*
1 point
Static arrays
Lambda expressions
Pointer arithmetic
Assignment expressions
goto statements
Support for functional programming in imperative languages often includes
*
1 point
Higher-order functions
Elimination of variables
No side effects
Mandatory immutability
Removal of loops
Which of the following is a key advantage of functional programming?
*
1 point
Direct mapping to von Neumann architecture
Faster I/O operations
Simpler machine code generation
Easier reasoning and formal verification
Reduced memory usage
Functional languages often rely heavily on
*
1 point
Iteration
Recursion
Assignment
Side effects
Global variables
Which is a common criticism of functional languages?
*
1 point
Poor support for recursion
Inability to define functions
Potential inefficiency on von Neumann machines
Lack of expressiveness
Weak abstraction mechanisms
A copy of your responses will be emailed to the address you provided.
Submit
Clear form
Never submit passwords through Google Forms.
reCAPTCHA
Privacy
Terms
This content is neither created nor endorsed by Google. -
Terms of Service
-
Privacy Policy
Does this form look suspicious?
Report
Forms
Help and feedback