When you say 

{ model.primaryForecast.parameters | q = ... }

it seems to me that the type of the argument to the left of the '|'  is of 
the same type as model.primaryForecast.parameters, so to me,
this means something whose type and value is the same as 
model.primaryForecast.parameters, except that q has been changed.

My suggestion:

{ model | model.primaryForecast.parameters.q = ... }

makes it clearer, I think, that what you want is of type the same as model, 
but for which the sub sub sub field called q is changed.
At least that is what I meant, if I didn't mention that.

Then if I want something whose type is the same as a primaryForecast, but 
whose q value has changed, one could write:

{ model.primaryForecast | parameters.q = ... }

And if I want something of same type as model.primaryForecast.parameters, 
but with q changed, one could write:

{ model.primaryForecast.parameters | q = ... }

Anyway, this remains wishful, ... I am yet to grok the appeal of lenses.

On Tuesday, August 2, 2016 at 12:34:24 PM UTC-4, Robin Heggelund Hansen 
wrote:
>
> As far as I know, there is nothing against such a syntax, though I think 
> the preferred syntax would be `{ model.primaryForecast.parameters | q = 
> ...}`
> It just haven't been implemented yet.
>

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to