diff options
author | Akshay <[email protected]> | 2020-11-22 12:03:16 +0000 |
---|---|---|
committer | Akshay <[email protected]> | 2020-11-22 12:03:16 +0000 |
commit | 19a06028be67598e718ea13daa65dd82576ee8f4 (patch) | |
tree | d9ff90ad90507ded59c28f2fa3dac4110c884b1a | |
parent | e94b6b48fb0662aa1f779e729591592e53e63dbd (diff) |
mo utilz
-rw-r--r-- | src/Utils.elm | 10 |
1 files changed, 10 insertions, 0 deletions
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 = | |||
40 | wordCountWith : Array Word -> (WordStatus -> Bool) -> Int | 40 | wordCountWith : Array Word -> (WordStatus -> Bool) -> Int |
41 | wordCountWith words predicate = | 41 | wordCountWith words predicate = |
42 | words |> A.map .status |> A.filter predicate |> A.length | 42 | words |> A.map .status |> A.filter predicate |> A.length |
43 | |||
44 | |||
45 | triple : a -> b -> c -> ( a, b, c ) | ||
46 | triple a b c = | ||
47 | ( a, b, c ) | ||
48 | |||
49 | |||
50 | listIdx : List a -> Int -> Maybe a | ||
51 | listIdx ls idx = | ||
52 | List.head (List.drop idx ls) | ||