@Janis, no, truth be told I didn't like it as I was writing it, but it also 
didn't occur to me at the time to fire `where` down at the bottom like 
that. Doing so would satisfy "intent first", but I'd say `let` and `where` 
here would be tied in terms of "zig-zag annoyance", which is a natural 
outcome of the pattern of needing a shared bound value across two guards.

The next evolution, avoiding the problem of nested `where`s entirely:

f tree =
  case tree of
    Leaf x -> munge a (b x)
    Node s t -> munge a (c s t)
  where
    a = ...
    b x = ...
    c s t = ...

-- 
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