First class environments: Difference between revisions

m
Line 902:
 
=={{header|Phix}}==
Emulation using edx as an "enviroment index" into static sequences:. (You could of course nest the three sequences inside a single "environments" sequence, if you prefer.)
<lang Phix>function hail(integer n)
if remainder(n,2)=0 then
Line 951:
 
main()</lang>
Emulation using edx as a dictionary_id (creating a separate dictionary for each environment):
<lang Phix>function hail(integer n)
function hail(integer n)
if remainder(n,2)=0 then
n /= 2
7,818

edits