> yes.. I agree it went well.. I learned some bits and I think so did
> everybody..
ditto.
I just wrote my first haskell code. Only to find it was already
in the Prelude. Doh! But it was neat to work out. I was
attempting to explain to a friend on IRC how instead of (ie
Python):
def mysum(x):
sum = 0
for x in xrange(len(xs)):
sum = sum + x
return sum
You can just say like:
> mysum :: [Integer] -> Integer
> mysum [] = 0
> mysum (x:xs) = x + mysum xs
Awsome.
Thanks for the links, too. This looked interesting:
http://www.ittc.ku.edu/~alex/teaching/eecs368/documents/twoDznQ.pdf
I haven't had a change to really check it out. Might be fun. I'm going to do
another tutorial as soon as I can get hugs working.
For those who weren't there, we decided to try to research a problem to
solve/think about in haskell so we don't have to waste time contriving
hypothetical alorithms/circumstances when we meet--so we could focus on
language-specific issues.
If anyone has any ideas, they'd be greatly appreciated.
For anyone interested in dabbling in the functional programming I will offer
the following to egg you on:
quicksort (p:xs) = quicksort [ x | x <-xs, x <= p ]
++ [p] ++
quicksort [ x | x <- xs, x >p ]
these three lines represent the entire quicksort algorithm
nick
_________________________________________________________________
Dont just search. Find. Check out the new MSN Search!
http://search.msn.click-url.com/go/onm00200636ave/direct/01/
_______________________________________________
RLUG mailing list
[email protected]
http://lists.rlug.org/mailman/listinfo/rlug