Messages from list : cormas@cirad.fr

Choose a topic among the following archives :

function recursive

New Message Reply Date view Thread view Subject view Author view

Subject: function recursive
From: Diana Adamatti (diana.adamatti@poli.usp.br)
Date: Fri Nov 21 2003 - 18:55:33 CET

Hello!

My doubt is about SmallTalk. I'd like to call a function recursive. Is it possible?

For example:

functionA: cell
neighbourhood := cell recursiveNeighbourhood: 1.
 neighbourhood do:
   [:a | (a occupantAt: #Water) size > 0
    ifTrue:
     [self functionA: a.]].

Where I call functionA inside its definition.

Thank you.

Diana Adamatti
Laboratório de Técnicas Inteligentes - LTI
Escola Politecnica da Universidade de Sao Paulo - USP
http://www.lti.pcs.usp.br/~adamatti

New Message Reply Date view Thread view Subject view Author view
 

Back to home