From 476f7e43561f10d2c2fb3edea651cc436085ccfb Mon Sep 17 00:00:00 2001 From: Martin Potier Date: Thu, 11 Jan 2018 09:26:47 +0200 Subject: [PATCH] Add skeleton for solution in elm --- ep0001/Solution.elm | 51 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 ep0001/Solution.elm diff --git a/ep0001/Solution.elm b/ep0001/Solution.elm new file mode 100644 index 0000000..a9bc246 --- /dev/null +++ b/ep0001/Solution.elm @@ -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))