Skip to content

Instantly share code, notes, and snippets.

@jomontanari
Created November 16, 2011 01:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jomontanari/1368957 to your computer and use it in GitHub Desktop.
Save jomontanari/1368957 to your computer and use it in GitHub Desktop.
Seven Languages - IO Day 1
1 + 1 println
(1 + "one") println
"Is 0 true" println
0 == true println
"Is empty string true" println
"" == true println
"Is nil true" println
nil == true println
Hobbit := Object clone
Hobbit name := "Frodo"
Hobbit slotNames println
Elf := Object clone
Elf name := "Legolas"
Elf weapon ::= "Bow and arrow"
Elf setWeapon("Sword")
Elf weapon println
Elf slotNames println
Dog := Object clone
Dog name := "Harry"
Dog bark := method("Woof Woof" println)
Dog threwFoodUnderBed := method( i := 0; for(i, 1, 20, bark))
Dog threwFoodUnderBed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment