send a message code kata

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

send a message code kata

laurent laffont
Hi,

for PrStef (that may be renamed ProfStef - thanks Lukas) there are several ways to go to the next lesson:

PrStef next.

[PrStef next] value.

3=3 ifTrue: [PrStef next].

1 to: 1 do: [:i | PrStef next].

I'm thinking about adding more of it:

(Smalltalk at: #PrStef) next.

PrStef perform: #next.


I'm sure you know other funny ways to send #next on PrStef  :)


Laurent

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: send a message code kata

Henrik Sperre Johansen
If you add one on exceptions, maybe:
[PrStef bareNext] on: MessageNotUnderstood do: [PrStef next]

Cheers,
Henry

On 17.01.2010 11:39, laurent laffont wrote:
Hi,

for PrStef (that may be renamed ProfStef - thanks Lukas) there are several ways to go to the next lesson:

PrStef next.

[PrStef next] value.

3=3 ifTrue: [PrStef next].

1 to: 1 do: [:i | PrStef next].

I'm thinking about adding more of it:

(Smalltalk at: #PrStef) next.

PrStef perform: #next.


I'm sure you know other funny ways to send #next on PrStef  :)


Laurent
_______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: send a message code kata

Alexandre Bergel-4
In reply to this post by laurent laffont
I tried PrStef, the idea is really cool!

Alexandre


On 17 Jan 2010, at 07:39, laurent laffont wrote:

> Hi,
>
> for PrStef (that may be renamed ProfStef - thanks Lukas) there are  
> several ways to go to the next lesson:
>
> PrStef next.
>
> [PrStef next] value.
>
> 3=3 ifTrue: [PrStef next].
>
> 1 to: 1 do: [:i | PrStef next].
>
> I'm thinking about adding more of it:
>
> (Smalltalk at: #PrStef) next.
>
> PrStef perform: #next.
>
>
> I'm sure you know other funny ways to send #next on PrStef  :)
>
>
> Laurent
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project