func filterTasks(candidates []*api.Task, filters ...func(*api.Task) bool) []*api.Task {
    result := []*api.Task{}

    for _, c := range candidates {
        match := true