About the Elm compiler
Functional language for web frontends. Compiled online. Run Elm code in your browser with no install and no signup — the editor, the input and the output share one screen. Elm is executed by a remote runtime: your code is submitted to it and the output is returned to this page.
Press Run to execute the program, edit it and press Run again, or paste your own code over it. Everything you type stays in the page; the editor caches your work locally so a reload does not lose it.
A Elm example
This is the program the Elm editor opens with — run it as it is, then change it.
module Main exposing (main)
import Html exposing (..)
import Html.Attributes exposing (..)
main : Html msg
main =
let
students =
[ ( "Alice", 92 )
, ( "Bob", 87 )
, ( "Charlie", 95 )
, ( "Diana", 88 )
]
sorted =
List.sortBy (\( _, score ) -> -score) students
average =
toFloat (List.sum (List.map Tuple.second students))
/ toFloat (List.length students)
in
div [ style "padding" "2rem", style "font-family" "monospace" ]
[ h2 [] [ text "Elm Student Rankings" ]
, p [] [ text ("Average: " ++ String.fromFloat (toFloat (round (average * 10)) / 10)) ]
, ol []
(List.map
(\( name, score ) ->
The editor opens with the full program.
More Functional compilers
Browse all 109 languages — the same editor runs each of them, in the browser or on a shared runner.