To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 5011 (-5)
  RE: cursion (was RE: Would-be hacker queries.)
 
I hate to be pedantic, but what you're describing is functional composition. The key to recursion is that the function calls itself. e.g. int factorial(int n) // assumes n > 0 { if (n > 1) return n * factorial( n - 1); // the recursive call, this is (...) (28 years ago, 11-May-99, to lugnet.robotics)
 
  Re: A recursion question/test... (fwd)
 
----- Forwarded message from Rich Clemens ----- From: "Rich Clemens" <clemens@wvwc.edu> Subject: Re: A recursion question/test... Date: Tue, 11 May 1999 23:51:21 -0400 (define (sum num) (if (zero? num) 0 (+ num(sum (- num 1))))) ----- End of (...) (28 years ago, 12-May-99, to lugnet.robotics)
 
  Re: Scheme (fwd)
 
----- Forwarded message from Rich Clemens ----- From: "Rich Clemens" <clemens@wvwc.edu> Subject: Re: Scheme Date: Tue, 11 May 1999 23:26:18 -0400 A simple scheme interface such as (sensor <num> <type> <mode>) or (motor <letter> <direction> <speed>) (...) (28 years ago, 12-May-99, to lugnet.robotics)
 
  RE: Would-be hacker queries. (fwd)
 
----- Forwarded message from Joel Shafer ----- Date: Tue, 11 May 1999 11:53:27 -0500 From: Joel Shafer <joel@connect.net> Subject: RE: Would-be hacker queries. It's too bad that recursion pays the price of stack usage. Recursion is almost always a (...) (28 years ago, 12-May-99, to lugnet.robotics)
 
  Re: A recursion question/test... (fwd)
 
(...) Make that 'numbers' into 'positive integers' and it'll make more sense perhaps. (...) It's recursive, the only number you know is n. Language is really irrelevant. I asked for an algorithm. I'll give you a hint, it consists of two sentences (...) (28 years ago, 12-May-99, to lugnet.robotics)

Next Page:  5 more | 10 more | 20 more
Redisplay Messages:  All | Compact

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR