DEV Community

Discussion on: Why do you love working with your programming language?

Collapse
 
benibela profile image
Benito van der Zander

XPath has the best map and filter syntax.

E.g. if you have a $list of numbers, you can multiple them all by two using $list ! (. * 2)

Or if you only filter the numbers greater than 50, you can write $list[. > 50].

Or together, filter and map: $list[. > 50] ! (. * 2)

It all works without explicitly declaring variables, functions or loops.