Topic variable: Difference between revisions

m
→‎{{header|Sidef}}: improved the comment
m (→‎{{header|Sidef}}: improved the comment)
Line 310:
 
=={{header|Sidef}}==
The topic variableunderscore '(''_''') topic variable is defined at compile-time in every block of a program. To call a method on it, youwe can just use the prefix operatordot (''.method_name'') operator, followed by a method name, which is theequivalent same aswith ''_.method_name''.
<lang ruby>say [9,16,25].map {.sqrt}; # new arrayprints: [3, 4, 5]</lang>
 
=={{header|Standard ML}}==
2,747

edits