Pharo MOOC: A propossed change on factorial

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

Pharo MOOC: A propossed change on factorial

Offray Vladimir Luna Cárdenas-2
Hi all,

I'm advancing on the Pharo MOOC trying to catch the rest of the people.
It has been a really interesting learning experience.

Now I'm making the Block lesson on week 2 and I have found the factorial
example with its code. With the quality assistant It noticed no spaces
at the beginning or end of the blocks and I'm also wondering how the
factorial definition could be changed to give a more friendly message
for non integer positive numbers, similar to the one it gives for
negative number. For example, if I put "1.5 factorial" I get the "MNU:
BoxedFloat64>>factorial".

What could the strategy in this case?

Cheers,

Offray