Skip to content

Instantly share code, notes, and snippets.

#Функия для сортировки тредам по последним ответам или дате создания
threads = Thread.objects.all().prefetch_related('posts')
def thread_list_f(threads):
work_list = []
thread_list = []
for element in threads:
try:
work_list.append(element.posts.all()[::-1][0].post_time)
except IndexError:
work_list.append(element.thread_time)
def f1(x):
x = x
def f2(y):
x += y
return x
return f2
(defn f1 [x]
(let [x (atom x)]
(fn [y]