Chapter 7Let
There’s an old bit of wisdom that contends that naming things is one of the two hardest problems in programming. Difficult or not, putting names to values is something programmers do constantly. But in programs not all names are created equal. Sometimes we want to name a value that is going to stick around for a long time and we want that name to be widely visible. But sometimes we want a temporary name, a name that we can use right here, right now and then dispose of without another thought. The good news is that we have the first kind of names, the long-lasting ones, covered: that’s what def—and if you think about it, defn—are for.
So in this chapter we’ll look at let, which takes care of those local, temporary naming chores. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access