I asked on another forum for recommendations for languages to get a handle on functional programming. One suggestion was Elm, and when I saw some examples of apps developed in Elm, it seemed like this might be a good language to learn in order to implement a simple board game I’ve been working on. So that is why I’m here learning Elm.
However I believe I have wandered into something a bit (very) over my head, in that I’m a relative beginner to coding in general. Every few years I dip a toe in, learn a thing, then leave. Last time was ten years ago and the thing I learned was what object oriented programming is like. So you can see I’m starting from very little here.
Well anyway I’ve run into a early wall. I don’t understand how to use updated records. I’ve read the tutorial here and one other more handholdy Elm learning doc. In both cases, I learn how to update a record, and in both cases am told this doesn’t modify the record’s value but instead returns a new record. So far so good! But the issue I’m having is, I don’t understand how to use that updated record! As far as I can tell I have no way to name it. After the line in which I use the update syntax, as far as I can tell, the updated version of the record is just gone. I don’t get to use it again.
Am I missing something, up to and including the point? I believe this is a really basic question probably and I appreciate any assistance you have the patience to offer! I’m starting to get the feeling from the documentation and discussion I’m seeing that Elm isn’t thought of as a beginners language and that a lot of the discourse around it assumes knowledge of some important meta arcana I am wholly noncognizant of!