kiss-spaced-rep display when all cards finished

This commit is contained in:
2023-01-23 04:03:53 +00:00
parent 580f1a7fa1
commit 09250767a4

View File

@@ -139,12 +139,15 @@
(b.callSymbol "group" cardDecls)))
(function :Void studyAll [:StudyEngine engine]
(when studyList
(let [nextIndex (Std.random studyList.length)
nextToStudy (nth studyList nextIndex)]
(studyList.splice nextIndex 1)
(nextToStudy engine (studyAll.bind engine)))))
(if studyList
(let [nextIndex (Std.random studyList.length)
nextToStudy (nth studyList nextIndex)]
(studyList.splice nextIndex 1)
(nextToStudy engine (studyAll.bind engine)))
{
(engine.clear)
(engine.println "All cards studied")
}))
(defReaderMacro ["*" "?"] [stream &builder b]
(let [elements []]