-
Notifications
You must be signed in to change notification settings - Fork 15.5k
Open
Description
Checks
- This is not a duplicate of an existing issue (please have a look through our open issues list to make sure)
- I have thoroughly read and understand The Odin Project Contributing Guide
- Would you like to work on this issue?
Describe your suggestion
I am not sure that the example is doing a good use of the term immutable. They example:
immutable = Array.new(3) { Array.new(2) }
Creates and array which we clearly can change:
irb(main):011> immutable[0][0] = 1000
=> 1000
irb(main):012> immutable << "new element"
=> [[1000, nil], [nil, nil], [nil, nil], "new element"]
It might not bother new students of programming, but it does look strange if you already are
coming from a different language ...
I believe that a more accurate description can be used here. For example:
An array with references to different objects
Path
Ruby / Rails
Lesson Url
https://www.theodinproject.com/lessons/ruby-nested-collections
(Optional) Discord Name
No response
(Optional) Additional Comments
Thank you for creating this project!
Metadata
Metadata
Assignees
Labels
No labels