Add default introductory code example

Instead of having logic for a fallback in the backend, we're choosing a
default for the snippet file.

For tracks that have core exercises, we pick the first core exercise.
For tracks without these, we pick the first exercise listed in the config.

Note that we're aiming for 10 lines and a max-width of 40 columns.
This solution has 11 lines, so we may want to adjust it.
This commit is contained in:
Katrina Owen 2017-08-22 12:50:45 -06:00
parent bd7f8e57d3
commit 0abb4b208b

10
docs/SNIPPET.txt Normal file
View file

@ -0,0 +1,10 @@
module HelloWorld exposing (..)
helloWorld : Maybe String -> String
helloWorld name =
case name of
Just name ->
"Hello, " ++ name ++ "!"
Nothing ->
"Hello, World!"