impl deleting tasks and relations

This commit is contained in:
Spaghettificated 2024-07-08 15:48:48 +02:00
parent 44ae363f58
commit 13f390b1b5

11
todo.pl
View File

@ -47,6 +47,17 @@ new(X,Y) :-
write(X), write(X),
write(" as a subtask for "), write(" as a subtask for "),
write(X). write(X).
delete(X):- idx(X,Y), delete(Y).
delete(X):-
retractall(task(X,_)),
retractall(requires(X,_)),
retractall(requires(_,X)).
delete(X,Y):- idx(X,T), delete(T,Y).
delete(X,Y):- idx(Y,T), delete(X,T).
delete(X,Y):- retractall(requires(X,Y)).
depend(X,Y) :- idx(X, Task), depend(Task, Y). depend(X,Y) :- idx(X, Task), depend(Task, Y).
depend(X,Y) :- idx(Y, Task), depend(X, Task). depend(X,Y) :- idx(Y, Task), depend(X, Task).
depend(X,Y) :- depend(X,Y) :-