Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Io TYS
Index -> General Programming
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
wtd




PostPosted: Sun Nov 19, 2006 10:19 am   Post subject: Io TYS

Reimplement Io's "if" such that the following code will run and produce the expected result.

code:
myif(false, 3) println

myif(3, 4, 5, 6) println

myif(nil) mythen(
   "hello" println
) myelseif("foo") then(
   "wooble"println
) myelse(
   "world" println
) println


Your implementation may use Io's "if", but should do so as sparingly as possible.
Sponsor
Sponsor
Sponsor
sponsor
Display posts from previous:   
   Index -> General Programming
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 1 Posts ]
Jump to:   


Style:  
Search: