let routines = [ (Repository.routine_id "ideal", Prescription.Routine.ideal) ] let find id = List.assoc_opt id routines let find_by_name name = List.find_map (fun (_, routine) -> if String.equal (Prescription.Routine.name routine) name then Some routine else None) routines