I liked this article - I wrote a similar one when I was starting out with Julia too!
And then a kind Teacher Assistant for my course came along (with a sneaky smile) and whispered something about some ternary operator...
myfact(n::Int)=n==0?1:n*myfact(n-1)
...Which creeped me out.
Vexed me!
But not as much as when I found out about the world of map, reduce, and folds, and all those nifty iterator methods that can get you out of a pinch:
myfact(n::Int)=prod(big(1):n)
For further actions, you may consider blocking this person and/or reporting abuse
I liked this article - I wrote a similar one when I was starting out with Julia too!
And then a kind Teacher Assistant for my course came along (with a sneaky smile) and whispered something about some ternary operator...
...Which creeped me out.
Vexed me!
But not as much as when I found out about the world of map, reduce, and folds, and all those nifty iterator methods that can get you out of a pinch: