From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_05,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f3168034ad0ab067,start X-Google-Attributes: gid103376,public From: "Dirien B. Perez" Subject: Recursion Date: 1997/10/06 Message-ID: <34392AFD.280C@newtimes.com>#1/1 X-Deja-AN: 278925879 Newsgroups: comp.lang.ada Date: 1997-10-06T00:00:00+00:00 List-Id: Hi I am having some problems with recursion I have the iterative version of a function that will calculate the sum of the elements is a linked list: function sum(list:cell_ptr) return integer is local:cell_ptr:=list; s:integer:=0; begin while local /= null loop s:=s+local.value; local:=local.next end loop; return s; end sum; I need help creating the recursion version. Also I need to createa recursive definition of the set of all positive numbers containing only the digits 3,5 and 9. I appreciate any help that I can get...... and thank you in advance. future ada programmer..