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

Username:   Password: 
 RegisterRegister   
 The Next Mainstream Programming Languages
Index -> Programming, General Programming -> Functional Programming
Goto page Previous  1, 2
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
wtd




PostPosted: Tue Feb 07, 2006 7:32 pm   Post subject: (No subject)

The second question is delightfully simple when pattern matching comes into the picture.

code:
myOtherWeirdFunc (x:lst@(x':xs)) =
   x' - x : myOtherWeirdFunc lst
myOtherWeirdFunc _ = []
Sponsor
Sponsor
Sponsor
sponsor
bugzpodder




PostPosted: Tue Feb 07, 2006 9:37 pm   Post subject: (No subject)

if anything, writing haskell programs is much more fun than writing c++ ones! I'll give that for sure!
wtd




PostPosted: Tue Feb 07, 2006 9:48 pm   Post subject: (No subject)

Excellent. There's hope for you yet. Smile
Display posts from previous:   
   Index -> Programming, General Programming -> Functional Programming
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 2 of 2  [ 18 Posts ]
Goto page Previous  1, 2
Jump to:   


Style:  
Search: