diff options
author | Alban Gruin | 2020-09-19 17:01:29 +0200 |
---|---|---|
committer | Alban Gruin | 2020-09-19 17:01:29 +0200 |
commit | cd3d6caea294eb041e8635c5f62ec90027fee281 (patch) | |
tree | 5de24dc2893d1cae306cc0f7863512cddd6836e3 | |
parent | 35c693e146746af36b251159eae96660c75b3c71 (diff) |
course: invert the `group_affix' list order
Each affix is tested with a `List.fold_left', which means that the
list is traversed in order. Hence, the most likely results should be
at the beginning of the list, not at the end.
Signed-off-by: Alban Gruin <alban at pa1ch dot fr>
-rw-r--r-- | src/course.ml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/course.ml b/src/course.ml index 3280aa3..4d02df3 100644 --- a/src/course.ml +++ b/src/course.ml @@ -35,9 +35,9 @@ let replace_entities str = |> Stringext.replace_all_assoc str let check_groups str = - let group_affixes = ["MAT-Agreg Interne "; "3EME ANNEE "; "2EME ANNEE "; - "1ERE ANNEE "; "MAG1 "; "DEUST "; "M2 "; "M1 "; "L3P "; - "L3 "; "L2 "; "L1 "] in + let group_affixes = ["L1 "; "L2 "; "L3 "; "L3P "; "M1 "; "M2 "; "DEUST "; + "MAG1 "; "1ERE ANNEE "; "2EME ANNEE "; "3EME ANNEE "; + "MAT-Agreg Interne "] in List.fold_left (fun res affix -> res || Astring.String.is_prefix ~affix str) false group_affixes |