5

I am very sorry if I ask a wrong question but I really need a professional help. I have to make a rather complex project for a begginer, using Visual Haskell, for a course of functional programming. The problem is that because I am at the beginning I don't know what kind of theme to pick. I want to make a project that evidentiates the real utility of functional programming. If you could just give me some ideas I will be very grateful.

Thanks

2
  • Has the teacher given any other guidelines?
    – Tyler
    Nov 13, 2010 at 0:15
  • No he didn't give us any other guidelines
    – izayoi
    Nov 14, 2010 at 6:19

2 Answers 2

5

You could design a simple programming language and write an interpreter for it:
Check the tools Alex (http://www.haskell.org/alex/) for lexical analysis, and happy (http://www.haskell.org/happy/) for parsing your code.

You can make the language as complex as you want. I think that defining While loops and functions could make it sufficiently complex and satisfying for a beginner.

2
  • 3
    Parsec is pretty usable, too.
    – user395760
    Nov 12, 2010 at 19:42
  • 2
    Three cheers for parsec. Haskell is too powerful to need a parser generator.
    – luqui
    Nov 12, 2010 at 20:26
3

want to make a project that evidentiates the real utility of functional programming. If you could just give me some ideas I will be very grateful.

Alright, then let me tell you something. Programming is about expression. Functional languages let you express things differently. What are the benefits of the expressions made possible with functional programming?

Infinite lists and recursion can be expressed very simple.

Recursion is functional programming done right.

Try to implement algorithms and datastructures that use it. Balanced trees, fibonacci, euclidian algorithm, all that will benefit from it. Really, anything that features a tree can be expressed very elegantly in functional languages.

Give mathetmical problems a try, try to solve the Euler Problems with Haskell.

3
  • Infinite lists example: fibs = 0 : 1 : zipWith (+) fibs (tail fibs). Best fibonacci implementation ever.
    – user395760
    Nov 12, 2010 at 19:46
  • @delnan: Better use @-Patterns... ;)
    – fuz
    Nov 13, 2010 at 7:09
  • @FUZxxl: Why did you downrate me, please explain.
    – Falcon
    Nov 13, 2010 at 8:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.