Hacker News new | past | comments | ask | show | jobs | submit | more Debilski's comments login

round(x) only works for a few specialised types of x. help(round) tells you that it will return the same type then. Of course for a type of MathConst{:π}, that won’t work. For generic types, you need to at least specify the number of digits (round(pi, 3)). (See also: methods(round))


Weird that they have round(pi) as an example.


It may have worked at some point. The language evolves pretty quickly at the moment.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: