Rename year directories to allow natural ordering

This commit is contained in:
2023-12-20 03:57:27 +00:00
parent 0ab1f5ad3a
commit 1f7d812b98
1895 changed files with 0 additions and 7188 deletions

View File

@ -0,0 +1,8 @@
% base fact: if the list is empty, the list to be returned is just the element
insertInOrder(Element, [], [Element]).
% if the element to be inserted is <= the head of the list, insert it at the head of the list
insertInOrder(Element, [Head | Tail], [Element, Head | Tail]) :- Element =< Head.
% if the element to be inserted is greater than the head of the list, recurse with the tail of the list until
insertInOrder(Element, [Head | Tail], [Head | NewTail]) :- Element > Head, insertInOrder(Element, Tail, NewTail).