From ee3b01bf7027798ba23153aef7f4ccc57f5f7b38 Mon Sep 17 00:00:00 2001 From: Alban Gruin Date: Sat, 5 Feb 2022 15:14:26 +0100 Subject: ics: introduce functions to filter courses without location Signed-off-by: Alban Gruin --- src/ics.ml | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/ics.ml') diff --git a/src/ics.ml b/src/ics.ml index 5afff39..be7fb18 100644 --- a/src/ics.ml +++ b/src/ics.ml @@ -73,10 +73,15 @@ module Event = struct found || List.exists ((=) group) groups) false event.groups let get_groups event = event.groups + + let has_no_locations event = + event.location = None end type t = Event.t list +let filter_empty_locations = + List.filter (Event.has_no_locations) let filter_groups groups = List.filter (Event.has_groups groups) -- cgit v1.2.1