I was updating the github readme page and I added a number of factorial examples. Here is me testing them in Rye REPL.
For more, visit: https://github.com/refaktor/rye, you will find this code near the top of the README.
Otherwise, "smarter" and shorter code is not always better code. I am not making a statement about which version of factorial function here is better. But factorial is very known simple problem and as such it's good way to quickly show some specific features of Rye.
You won't understand those features from this short demo, and they might seem weird or complex, but you will know something is there and if you want to dig deeper you might see they are consistent and make sense in the bigger scheme ... I hope :)
Komentarji
Objavite komentar