Anonymous user
Scope modifiers: Difference between revisions
→{{header|Ela}}
m (→{{header|REXX}}: added comment about names of subroutines. -- ~~~~) |
|||
Line 167:
Variables in Ela are lexically scoped (pretty similar to Haskell) and can be declared using let/in and where bindings. Additionally Ela provides a 'private' scope modifier for global bindings:
<lang ela>
pi # private
pi = 3.14159
sum # private
Names declared with 'private' modifier are not visible outside of a module. All other bindings are visible and can be imported. It is an error to use 'private' modifier on local bindings.
|