let is Tide’s way to name a value.
You can think of it as “pin this value to a name so I can use it later.”
Basic bindings
Bindings are just values
You can bind any expression:Scope (what can “see” what?)
Tide currently has a simple model:letbindings at the top level are available to later code in the same file.- Comprehension variables (like
xin[... for x in ...]) are local to that comprehension.
A practical tip
When exploring the language, it’s totally normal to write:- a few
lets - then a bunch of
querys