archives

The Worst Monad Tutorial... Except For All Those Others.

Excuse the tongue-in-cheek title of my recent post detailing my adventures in writing monads in C# 2.0. I believe I've finally nailed down the problems I was having, so thought I'd share. I'd welcome any corrections. :-)

Looking for experienced help

Hello!

I just completed a functional programming course that I enjoyed, so much in fact, I find myself addicted to programming with scheme. I am coming here because I am only a computer science minor, and this one course was my only exposure to functional programming, where we used DrScheme for the course.

We were given a term project, and my submission earned me a free pass from the final exam. The problem was based on a contest problem from our regional 2007 ACM contest, found here http://www.acmgnyr.org/year2007/e.pdf.

I had fun doing it, given my experience in the language it took me quite some time, however it was a fun exercise in working my logic and recursion skills. I am conducting some peer leader workshops at my university, and I would like to use my work as an example, but I think it can be improved, looking at the example below it prints unnecessary top (only when the greatest is on top) 'flips' because of the recursive nature; and the output probably leaves something to desire.

(1 -3 -2)
2 1 3 1 2 1""
(-3 1 -2 -4)
4 1 4 1 1 3 1 2 ""
(1 2 3 4 -5)
5 1 5 4 4 3 3 2 2 ""

There is no money or profit for me to gain from this, and I offer none either, I'm just looking for some willing code discussion! If interested in discussing the program, send me your email or send a request to me a weatherward_AT_gmail

Thank you!