Created
May 21, 2011 19:12
-
-
Save b1naryth1ef/984802 to your computer and use it in GitHub Desktop.
Self 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 #This is a new module in 3, which is best run for people messing with the eng functions. | |
.eng(engine()) | |
.sys | |
.math | |
[/] | |
#Function | |
engine(){ | |
for flag[._self.request()]: | |
write.~.request():> stdout #:> is the new method of pushing elements in line. | |
#eng.init(engine()) | |
._self.eng.init #both of these ways work now. | |
} | |
#Class | |
main[ | |
if _SELF_ init: | |
"Loaded":>_SELF_.stdout | |
if ._self: | |
print ._self | |
] | |
#Method | |
combine(in):("Combine"):(out){ | |
in.split(._self) #The same as in.split: split for in in in: | |
combine.in: | |
+._self #Same as + for in in in: | |
-" " | |
} | |
exit:>engine | |
exit:>%env% | |
<gator.exit //> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment