gleam-lang / language-tour

👩🏽‍💻 Learn Gleam in your browser
https://tour.gleam.run/
74 stars 55 forks source link

No example of record destructuring in a let assignment #56

Closed lpil closed 1 month ago

xxKeefer commented 3 months ago

Hey there 👋🏻, would love to help out with this one!

Just some clarifying questions, should there be an extra step in the tour like in between Records and Record Accessors under Data Types or should the example for Records be updated?

Looking at the current Record page and it's example, to be able to destructure a SchoolPerson i think it would require the use of a case or let assert to destructure. I feel as if using those concepts would make the example of record destructuring less clear, especially in the case of let assert.

If i can get a point in the right direction here i'll get started ASAP. <3

lpil commented 3 months ago

A new lesson on record patterns or something like that sounds good to me!