Hopp til hovedinnhold

Robin Heggelund Hansen

5 innlegg

Fixing a performance problem in Elm using Html.Lazy

Elm
Artikkel (9 min)
Fra Robin Heggelund Hansen

How you can increase the performance of your Elm application using Html.Lazy, and why that motivated me to look into elm-css.

When it comes to ports, three's a crowd.

Elm
Artikkel (4 min)
Fra Robin Heggelund Hansen

Now that you've learned how to define both incomming and outgoing ports, you might wonder how many of them you need. It might seem reasonable to require two ports for each javascript function you wish to call, but what if I told you'll need, at most, two for the entire application?

What do we do with what's inside the box?

Elm
Artikkel (3 min)
Fra Robin Heggelund Hansen

Elm doesn't have nulls or undefineds, it has a Maybe type. While it's a pleasent type to work with, it might take some getting used to if you're coming from a language like Java or Python. Let's take a look at how we perform some basic operations over the Maybe type.

Operators are functions, too

Elm
Artikkel (3 min)
Fra Robin Heggelund Hansen

Much of Elm's power stems from the fact that most things are just functions. So how do operators fit in?

Hurry, curry!

Elm
Artikkel (2 min)
Fra Robin Heggelund Hansen

Today we'll look at an interesting property of Elm known as currying. We will only explain the principle today, then spend the next two days seeing how it can be useful in practise.