Looking for FIT2102 Programming paradigms - S2 2025 test answers and solutions? Browse our comprehensive collection of verified answers for FIT2102 Programming paradigms - S2 2025 at learning.monash.edu.
Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!
The "Higher-Order Functions" chapter introduces a compose function. What is its purpose and what programming style does it enable?
const compose = (f, g) => (x) => f(g(x));In the RxJS Observable implementation discussed in the "Functional Reactive Programming" chapter, what triggers the stream to begin emitting values?
What is the formal definition of a combinator?
Which of the following best describes Eta Conversion in Lambda Calculus?
The chapters on Lazy Evaluation and Functional Reactive Programming describe two different models for handling sequences of data over time. Which of the following correctly describes the interaction model for LazySequence and Observable?
Using the combinator-based definitions for cons, head, and tail from the "Higher-Order Functions" chapter:
cons = x => y => f => f(x)(y)head = l => l(K) where K = x => y => xtail = l => l(K(I)) where I = x => x
What is the result of head(tail(cons(1)(cons(2)(null))))?
What is the main advantage of using a curried function?
Consider the following RxJS code snippet from the "Functional Reactive Programming" chapter:
const columns = of('A', 'B', 'C');const rows = range(3);columns.pipe( mergeMap(column => rows.pipe( map(row => [column, row]) ))).subscribe(console.log);
What will be logged to the console?
In the "FRP Asteroids" example, what key architectural problem was solved by introducing the scan operator to the Observable stream?
In the "pure FRP" architecture used for the Asteroids game, where is the impure, effectful code (e.g., code that directly manipulates the DOM) located?