mirror of
https://github.com/correl/elm.git
synced 2024-11-24 03:00:10 +00:00
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:
parent
bd7f8e57d3
commit
0abb4b208b
1 changed files with 10 additions and 0 deletions
10
docs/SNIPPET.txt
Normal file
10
docs/SNIPPET.txt
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
module HelloWorld exposing (..)
|
||||||
|
|
||||||
|
helloWorld : Maybe String -> String
|
||||||
|
helloWorld name =
|
||||||
|
case name of
|
||||||
|
Just name ->
|
||||||
|
"Hello, " ++ name ++ "!"
|
||||||
|
|
||||||
|
Nothing ->
|
||||||
|
"Hello, World!"
|
Loading…
Reference in a new issue