Skip to content

Latest commit

 

History

History
37 lines (24 loc) · 1.82 KB

elmIntroduction1.md

File metadata and controls

37 lines (24 loc) · 1.82 KB
id
litvis

@import "../css/tutorial.less"

Litvis tutorials: Introducing Elm.

  1. Introduction
  2. Functions, functions, functions
  3. Types and pattern matching
  4. Lists and list processing
  5. Elm and elm-vegalite

An Introduction to Elm

This tutorial introduces the Elm programming language and briefly covers some basics of functional programming for use with the litvis environment.

You can edit the example elm code in these tutorial pages to experiment with the ideas introduced.

What is Elm?

Elm is a declarative statically typed pure functional programming language that is transpiled into JavaScript. Or in English, it is a programming language where:

  • you describe what you want to do by creating expressions ("declarative") rather than provide instructions on how to do something;
  • data and expressions are placed into 'types' and once categorised in this way, cannot change type ("statically typed");
  • code is organised into functions that evaluate an expression to produce some value ("pure functional");
  • before elm code is executed, it is translated into JavaScript so can run in browsers and related technologies like litvis ("transpiled").

Elm in combination with the elm-vegalite and elm-vega packages can be used in litvis to create visualization specifications. But Elm can also be used to perform a range of other tasks to enrich your litvis documents. The basics covered in this set of tutorials should provide you with the background to use code effectively in with litvis.


Next >> Functions, functions, functions