Created
May 21, 2011 18:47
-
-
Save b1naryth1ef/984784 to your computer and use it in GitHub Desktop.
Dict examples
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<gator> | |
[.load] | |
.source | |
.eng(engine()) | |
.dict(dict()) | |
.dicty #A simple handler for the dict plugin | |
.sys | |
[/] | |
engine(){ | |
engine.eng:>%env% | |
} | |
x = [joe,lucy,martha] | |
for item in x: #Looks like python! | |
dicty.create.var(item) | |
dicty.esc(x[1]) = "Joe" #This escapes the item as a dict. So it loads the variable (if one was made). | |
dicty.esc(x[2]) = dicty.esc(x[1]) | |
print dicty.esc(x[1]) #Prints out Joe | |
print dicty.esc(x[2]) #Also prints out joe | |
d(_in_):(_type_): | |
dicty._type_(_in_) | |
d.esc(x[1]):>stdout | |
exit:>engine | |
exit:>%env% | |
<gator.exit //> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment