DEV Community

Discussion on: I am the author of Elm in Action. Ask Me Anything!

Collapse
 
saucewaffle profile image
SauceWaffle

Where do you draw the line of functionality in your 'let/in' before breaking out into multiple functions to accomplish the same thing?

I find myself commonly having 5 or more variables defined in my 'let' that are staged versions of the first and wonder if that is a bad thing.

Collapse
 
rtfeldman profile image
Richard Feldman

I tend to pull things into the toplevel early and often, but I also tend to use the (|>) operator wherever possible.

That said, I wouldn't call having several declarations in the same let a bad thing per se. So long as you find it readable, it's unlikely to cause problems outside that let, so I wouldn't worry about it. :)