The underlying api for map, filter, reduce and friends is actually useful in its own right if you want to start your own queries from a base iterable, so that instead of:
for (let desc of map(state.todos, todo => todo.description)) {
}
You can say:
for (let desc of query(state.todos).map(todo => todo.description) {
}
It's more than just stylistic though since queries are monadic, you can make them arbitrarily complex.
The underlying api for
map,filter,reduceand friends is actually useful in its own right if you want to start your own queries from a base iterable, so that instead of:You can say:
It's more than just stylistic though since queries are monadic, you can make them arbitrarily complex.