in reply to Re: RFC: A Perlesque Introduction to Haskell, Part One (draft)
in thread RFC: A Perlesque Introduction to Haskell, Part One (DRAFT)
is barely different from the generic functional code ofsub factorial { my ($i) = @_; return 1 if ( $i <= 0 ); return $i * factorial( $i-1 ); }
Both are solutions to the question 'what is factorial(i).' So, really, I'd say that coding in general is about forming well-defined questions, writing those down on paper, and then composing answers in code.factorial 0 : 1; factorial i : i * factorial( i - 1 );
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: RFC: A Perlesque Introduction to Haskell, Part One (draft)
by etcshadow (Priest) on Jun 24, 2004 at 02:17 UTC | |
by Sidhekin (Priest) on Jun 24, 2004 at 02:29 UTC | |
by ihb (Deacon) on Jun 24, 2004 at 02:44 UTC | |
by etcshadow (Priest) on Jun 24, 2004 at 02:40 UTC |