Skip to content

Instantly share code, notes, and snippets.

@b1naryth1ef
Created May 21, 2011 18:47
Show Gist options
  • Save b1naryth1ef/984784 to your computer and use it in GitHub Desktop.
Save b1naryth1ef/984784 to your computer and use it in GitHub Desktop.
Dict examples
<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