Note 1: This article is executable code. You can copy and paste this article in a file with extension .lhs (say crypto.lhs), load it in a haskell interpreter and run the examples! You can get started by installing the haskell platform on Windows, Linux or Mac. You can learn Haskell by reading the excellent tutorial … read more
Feb 122011
When learning a programming language, won’t it be nice if you can get some instant feedback on your code? Of course, you cannot expect feedback on bugs in your program. But each language has some built in functionality and idioms which a beginner may not be aware of and it will be helpful to get … read more
Jun 302008
Fibonacci numbers are a series of numbers such as 1,1,2,3,5,8,13,21,34,55,….
You can write a simple program, such as the one given below, in any language such as perl, python, ruby, javascript, php, java, haskell etc.
slowFib 0 = 1 slowFib 1 = 1 slowFib n = slowFib (n -2 ) + slowFib (n – 1) … read more
