Never miss a beat

Join my newsletter.

Tag: elm

Generating HTML from a List in Elm

Published: 6/27/2019

Elm is a fantastic language for building web applications. It provides a rich DSL for writing HTML that functions in a similar way to JSX (but still quite different). Overall, I enjoy writing it, however, I often forget how to generate HTML from a list of data in Elm. Indeed, the problem is not that difficult, and once you approach it from a functional mindset, it’s easy to see how it works. A simple, yet somewhat contrived example, can be found below: You’ll notice a couple of things: Our Model…