in reply to Re^3: RFC: A Perlesque Introduction to Haskell, Part One (draft)
in thread RFC: A Perlesque Introduction to Haskell, Part One (DRAFT)
Haskel goes a little further, though, because it supports function-dispatch by pattern matching...
My mind has been full of Perl6 lately ... so bear with me ...
multi sub factorial (Any where {$^n==0} $n) { 1 } multi sub factorial ($n) { $n * factorial $n-1 }
... which of course will recurse infinitely when given factorial 0.5 or factorial -1 ...
ObTopic: How do the Haskell examples handle those cases?
print "Just another Perl ${\(trickster and hacker)},"
The Sidhekin proves Sidhe did it!
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: RFC: A Perlesque Introduction to Haskell, Part One (draft)
by ihb (Deacon) on Jun 24, 2004 at 02:44 UTC | |
Re^5: RFC: A Perlesque Introduction to Haskell, Part One (draft)
by etcshadow (Priest) on Jun 24, 2004 at 02:40 UTC |