diff options
Diffstat (limited to 'src')
-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) | ||