aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkshay <[email protected]>2020-11-22 12:03:16 +0000
committerAkshay <[email protected]>2020-11-22 12:03:16 +0000
commit19a06028be67598e718ea13daa65dd82576ee8f4 (patch)
treed9ff90ad90507ded59c28f2fa3dac4110c884b1a
parente94b6b48fb0662aa1f779e729591592e53e63dbd (diff)
mo utilz
-rw-r--r--src/Utils.elm10
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 =
40wordCountWith : Array Word -> (WordStatus -> Bool) -> Int 40wordCountWith : Array Word -> (WordStatus -> Bool) -> Int
41wordCountWith words predicate = 41wordCountWith words predicate =
42 words |> A.map .status |> A.filter predicate |> A.length 42 words |> A.map .status |> A.filter predicate |> A.length
43
44
45triple : a -> b -> c -> ( a, b, c )
46triple a b c =
47 ( a, b, c )
48
49
50listIdx : List a -> Int -> Maybe a
51listIdx ls idx =
52 List.head (List.drop idx ls)