Hi all - I've run up against a minor wall and I was hoping to get some insight.
According to the Mapbox docs for the + expression, it can sum more than two arguments. https://docs.mapbox.com/mapbox-gl-js/style-spec/expressions/#+
["+", number, number, ...]: number
However, the plus operator in this library only takes in two arguments. I was really hoping to get this working with arbitrary lists.
Looking at the source for this library, it doesn't seem too difficult to write, eg:
plusMany : List (Expression exprType Float) -> Expression exprType Float
plusMany =
calln "+"
However, calln isn't exposed so I'm unable to write this in my own projects! Any other potential solutions to this that I'm missing?
Hi all - I've run up against a minor wall and I was hoping to get some insight.
According to the Mapbox docs for the
+expression, it can sum more than two arguments. https://docs.mapbox.com/mapbox-gl-js/style-spec/expressions/#+However, the
plusoperator in this library only takes in two arguments. I was really hoping to get this working with arbitrary lists.Looking at the source for this library, it doesn't seem too difficult to write, eg:
However, calln isn't exposed so I'm unable to write this in my own projects! Any other potential solutions to this that I'm missing?