From 19a06028be67598e718ea13daa65dd82576ee8f4 Mon Sep 17 00:00:00 2001 From: Akshay Date: Sun, 22 Nov 2020 17:33:16 +0530 Subject: mo utilz --- src/Utils.elm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Utils.elm b/src/Utils.elm index 0f3164f..83e025b 100644 --- a/src/Utils.elm +++ b/src/Utils.elm @@ -40,3 +40,13 @@ diffDuration t1 t2 = wordCountWith : Array Word -> (WordStatus -> Bool) -> Int wordCountWith words predicate = words |> A.map .status |> A.filter predicate |> A.length + + +triple : a -> b -> c -> ( a, b, c ) +triple a b c = + ( a, b, c ) + + +listIdx : List a -> Int -> Maybe a +listIdx ls idx = + List.head (List.drop idx ls) -- cgit v1.2.3