Get a first taste of Elm’s syntax in this kata to implement your own map function. We’ll start with a failing test suite, work through first errors, make the tests pass, explain basic tidbits of syntax along the way.
There aren’t many functions in the standard lib for elm that create side effects. Elm’s
Debug.log is one of those exceptions. It logs to the console. Here’s how it’s setup to make console logging whilst piping easier that patting your head whilst rubbing your tummy.
Debugging in Elm is easy once you know where to look. You need an in-browser tool to help you. It’s almost as simple as just calling
console.log, but you can’t just put your logging statement anywhere.
Exercism.io is a fantastic site and tool that provides a wealth of daily code exercises. If you want to learn to be better in a language, it’s a great resource to do exercises and receive feedback.