Home Project Folders Resources How Do I? MWForum
Site Map Search Our Team

MWForum Message [Date Index] [Threads] [Authors] [Attachments] [Subscribe]

[Thread Prev] [Thread Next]

To: <mwforum@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: MIA, Ask an Expert: procedure using recursion
From: "Jeff Knope" <jknope@xxxxxxxx>
Date: Fri, 17 Jun 2005 15:37:37 -0700

Hi Kate,

A recursive procedure invariably requires some prior setup.  For example:

to GETREADY
make "them [12 2 43 17 64 128]       ;;the material to be processed
make "these []        ;;the repository of the processing
end

then, something like this:

to ADD3 :them
if :them = [] [stop] ;;criteria for when to quit
make "these lput (first :them) + 3 :these ;;the action done to each element of :them
ADD3 bf :them ;;repeatedly calls itself, but without the first element of the preceding recursion.
end


show :these
15 5 46 20 67 131

And thank you for bringing some common sense to the intellectual property question.
--Jeff


----- Original Message ----- From: "Ask an Expert - Question" <askanexpert@xxxxxxxxxxxxxxxxxxxxx>
To: <mwforum@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sent: Friday, June 17, 2005 1:26 PM
Subject: MIA, Ask an Expert: procedure using recursion



This is an automatic message sent from the web form at:
http://mia.openworldlearning.org/mwforum.htm

from: Kate Mikula <mickeynkate@xxxxxxx>
date: Fri Jun 17 14:03:20 2005

Hi folks,

Could someone please send me a very simple procedure using recursion? It has been 10
years since I taught it and I need a refresher. I am using Microworlds2 opening in
classic (OS9) on a Mac - or just pop a few lines of code into the email.


About that comment that programmers should give their work away free..... If programming
is a person's chosen career, don't they deserve to earn a living? The ones I know push
their brains to the limit 60 hours a week. If they are required to give away their work
to benefit mankind, so should
EVERYONE else, from the man who picks up the trash to the theoretical scientist. I'd love
it if LCSI gave away free copies of Microworlds for OSX and Windows 2000.


Thanks for the help. Have a great  day. Hope it is sunny there too.

Kate in Austin





*****************************
OpenWorld Learning
http://www.openworldlearning.org








  • Previous by thread: MIA, Ask an Expert: procedure using recursion
  • Next by thread: Re: MIA, Ask an Expert: procedure using recursion

  • To save an attachment to your computer, PC users should right-click (Mac users, click and hold the mouse button) on the link and then choose 'save target as' from the pop-up menu. A window will then pop up in which you can choose a location for the file.


    © copyright 2001 - 2006