Add skeleton for solution in elm

This commit is contained in:
Martin Potier 2018-01-11 09:26:47 +02:00
parent ebdf81a926
commit 476f7e4356

51
ep0001/Solution.elm Normal file
View file

@ -0,0 +1,51 @@
-- #AUTO-IMPORTED
-- import Basics exposing (..)
-- import List exposing ( List, (::) )
-- import Maybe exposing ( Maybe( Just, Nothing ) )
-- import Result exposing ( Result( Ok, Err ) )
-- import String
-- import Tuple
--
-- import Debug
--
-- import Platform exposing ( Program )
-- import Platform.Cmd exposing ( Cmd, (!) )
-- import Platform.Sub exposing ( Sub )
module Main exposing (..)
import Html exposing (text)
import Dict exposing (..)
import Task exposing (fail)
type Stock
= Stock String Int
library1 : List Stock
library1 =
[ Stock "ABART" 20
, Stock "CDXEF" 50
, Stock "BKWRK" 25
, Stock "BTSQZ" 89
, Stock "DRTYM" 60
]
categories1 : List Char
categories1 =
[ 'A'
, 'B'
, 'C'
, 'W'
]
stockList : List Stock -> List Char -> List ( Char, Int )
stockList st cs =
...
main =
text (toString (stockList library1 categories1))