Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
19
Task/Array-concatenation/Elm/array-concatenation.elm
Normal file
19
Task/Array-concatenation/Elm/array-concatenation.elm
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import Element exposing (show, toHtml) -- elm-package install evancz/elm-graphics
|
||||
import Html.App exposing (beginnerProgram)
|
||||
import Array exposing (Array, append, initialize)
|
||||
|
||||
|
||||
xs : Array Int
|
||||
xs =
|
||||
initialize 3 identity -- [0, 1, 2]
|
||||
|
||||
ys : Array Int
|
||||
ys =
|
||||
initialize 3 <| (+) 3 -- [3, 4, 5]
|
||||
|
||||
main = beginnerProgram { model = ()
|
||||
, view = \_ -> toHtml (show (append xs ys))
|
||||
, update = \_ _ -> ()
|
||||
}
|
||||
|
||||
-- Array.fromList [0,1,2,3,4,5]
|
||||
Loading…
Add table
Add a link
Reference in a new issue