Currently mapping a collection using set is quite verbose and ugly:
// Current
return set(
response,
_ => _.results,
xs =>
xs.map(result =>
set(
result,
_ => _.poster_path,
path => 'http://image.tmdb.org/t/p/w185' + path
)
)
)
Proposal
set should accept multiple accessor function before the value transformer.
The first ones should only target arrays.
This would result in a much cleaner syntax:
// With map support
return set(
response,
_ => _.results,
_ => _.poster_path,
path => 'http://image.tmdb.org/t/p/w185' + path
)
Currently mapping a collection using
setis quite verbose and ugly:Proposal
setshould accept multiple accessor function before the value transformer.The first ones should only target arrays.
This would result in a much cleaner syntax: