foo() {
return x
.map()
}
baz() {
return foo()
.map()
}
fbaz() {
return baz()
.map()
}
This way, there is usually no good place to inspect the values and it is hard to reason about what even is the return type/value. Yes, the type system can take it, but good luck figuring out what is Map<Map<String,String>,List<String>>. Do this instead even though it looks "less clean"/uses a supposedly useless variable: foo() {
const helpfulName = x.map()
return helpfulName
}
baz() {
const anotherHelpfulName = foo.map()
return anotherHelpfulName
}
fbaz() {
const superHelpfulName = baz.map()
return superHelpfulName
}
In summary: please, for the love of all that is holy, resist the urge to write function chains, always store meaningful intermediary values in named variables with "why" comments in relevant places and do so especially with return values.