These are great! Though the documentation section was kind of surprising, as I don't think it's a good idea to write documentation in the REPL. Though perhaps you're trying to keep things simple by not getting into issues related to folder structure or using/import/include. There are always trade-offs.
@ElvisCasco2 жыл бұрын
In the function shoppinglist, length(items) doesn't work in newest version of Julia: function shoppinglist(items...) println("Number of items to buy: $(length(items))") for i in items println(i) end end I changed to: function shoppinglist(items...) println("Number of items to buy: $(size(collect(items))[1])") for i in items println(i) end end Is there another way of doing this?
@doggodotjl2 жыл бұрын
Hmm...I tried the code in the tutorial using Julia v1.7.2 which is the current version as of today (2022-04-18) and the code still works for me. I also copied the code from your comment and pasted it into my REPL and it also works for me.