Thanks all.
This code seems to do the job santaFloorOnBasement "calculates which step take Santa to the basement" | index| index := 1. [floor ~= -1 ] whileTrue: [ floor := ((input at: index) = '(' ) ifTrue: [ floor + 1 ] ifFalse: [ floor - 1 ]. index := index + 1 ]. ^ index -1 Roelof Op 9-11-2018 om 09:51 schreef Ben Coman:
|
- [Pharo-users] what must be instead of the ?? Roelof Wobben
- Re: [Pharo-users] what must be instead of the ?? Joachim Tuchel
- Re: [Pharo-users] what must be instead of the ?? Tim Mackinnon
- Re: [Pharo-users] what must be instead of the ?? Ben Coman
- Re: [Pharo-users] what must be instead of the ?? Roelof Wobben
- Re: [Pharo-users] what must be instead of the... Peter Uhnak
- Re: [Pharo-users] what must be instead of... Roelof Wobben
- Re: [Pharo-users] what must be inste... Roelof Wobben
- Re: [Pharo-users] what must be i... Gabriel Cotelli
- Re: [Pharo-users] what must ... Alistair Grant
- Re: [Pharo-users] what must ... Peter Uhnak
- Re: [Pharo-users] what must ... Alistair Grant
- Re: [Pharo-users] what must ... Alistair Grant
- Re: [Pharo-users] what must ... Roelof Wobben
- Re: [Pharo-users] what must ... Roelof Wobben