Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Using a loop and `if` statements as the book does is unidiomatic, the `replace` function (and the in-place equivalent `replace!`) work as you’d expect. https://docs.julialang.org/en/v1/base/collections/#Base.repl...

If you have a mapping dict defined I think the syntax is just `replace!.(rainData.month, monthMap...)`, not tested though.



Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: