Chapter 10, Part Laws. We don't need liftA2(concat).
Author: alisajadihCreated Nov 21, 2021Updated Sep 26, 2024
In chapter 10 on part laws. there is a code that demonstrates "applicatives are close under composition".
const tOfM = compose(Task.of, Maybe.of);
liftA2(liftA2(concat), tOfM('Rainy Days and Mondays'), tOfM(' always get me down'));
// Task(Maybe(Rainy Days and Mondays always get me down))I think we could remove liftA2 wrapper for concat function, It's useless.
liftA2(concat, tOfM('Rainy Days and Mondays'), tOfM(' always get me down'));
Source: MostlyAdequate/mostly-adequate-guide