Lists in anki: desiderata and partial solution
In this text, I assume you are familiar with anki, and in particular know what is a field, a card, a card's type (aka template), a note and a note's type (aka a model), and that you have an idea of what are the rules used by anki to decide which cards should be generated or not.
There is one big limitation in anki, it concerns lists. Here I list my trouble, the existing work arounds I know, their limits, and the functionnality I would really want. Sadly, this functionnality seems to require such a big modification of anki's underlying model that I fear that no add-on can answer my request. In particular if I want this request to also be satisfied in smartphone's application, which does not allows to add add-ons.
Learning a list of things is hard, but it's something I sometime want to do. A poem/song is just a list of line. Sometime, a mathematical notions have 4 distinct names. E.g. a pullback is also called a fiber product, a fibered product and a Cartesian square. In some othe case, a mathematical objects admits many distinct definitions. E.g. I've got 5 definitions of left-trivial monoids. And I'd also wanted to see if I can learn the list of the prime number less than 100. Mostly to see how hard it is to learn an arbitrary list.
Creating a note by question
Currently, I used the add-on «imports lyrics/poetry» for lyrics of song I like. This add-on creates a note by line of the lyrics. The main trouble is that, if you have an error in a line, you need to correct many notes since the error is repeated. And it's hard to correct many notes from the smartphone, while it is easy to just correct the current note. The second problem with this method is that, since each lines correpsond to a distinct note, there is no way to ask Anki to bury the other notes(lines) related to the same song.
Furthermore, it is really inneficient in term of memory. Indeed, the first line of a 120-line lyrics is copied 120 times in memory.
A field by question
Concerning the definitions, I have in my note type «name», «name 2», «name 3» and «name 4». And my note's type contains 4 similar card's type, with similar templates. And I did the same thing for the four fields «notation». Normally, it means that when I do want to change a template, I'll need to change it - at least - 4 times. In order to avoid this, I created MetaTemplate, a template for card's type. But it's not really easy to learn how to use it and I have no idea of how to make it more user friendly. And anyway, having four fields works only because it is a small list.
Let us imagine I would like to have a single note for an entire song. And this song is 120 lines longs. The only solution I see would be to create a field by note, hence for a song with 120 lines, I would need a note type with 120 fields and 120 cards. Which is not technically impossible, but unreasonable. In particular because anki is already slow when I edit a note type with 30 cards.
The first thing I did to learn lyrics is to use cloze deletion. A single line would be deleted, and I have to remember it. The trouble is that, seeing the line after the deleted one is a really strong hint I'm not supposed to have when I recite the song. I would rearry prefer Anki to give me the start of the lyrics and asking for the next line. As is done by «imports lyrics/poetry».
My ideal world
The first option I want is to write in a card's type: «here, show every element of the list "name", separated by a "comma"» (of course, "name" and "comma" could be replaced by any other field and any other separator.) Thus, my card would show «name: fiber product, fibered product, Cartesian square». This is specially important if the question is «what is the name of "the limit of a product"». In this place, I should remember one of the name. Thus the answer need to show me every possible answer, and I would accept iff I remembered at least one of the name.
Similarly, I'd like to be able to tell anki to generate n cards, where n is the number of elements of the list. In card i I want the option to tell anki to shows only the ith element of the list. In my example above, each card would contains one of the name of the objects which admits multiple definitions, and each card would ask to give the other name. Hence the question would be «What is(are) the other name of "fibered product"» and the answer would be "fiber product, Cartesian square".
I also want the option to tell anki to show each elements appart from the i-th one. For example, this would let me tell to anki to ask me the i-th name given the n-1 other name. This would be especially usefull in order to learn lyrics. Assuming that you know the 10 first line, it makes sens to let you read them again in order to find the i-th line. By symmetry I probably want to see the n-i last line. (I don't yet see the usage I would have of it, but no reason not to do it too)
I'd also love the option to ask Anki for lines i-4 to i-1. For example, in the case of learing lyrics, you probably could remember the i-th line with only the four last lines, and not the entire beginning of the lyrics. That is what the add-ons «imports lyrics/poetry» does. But with this add-on, it is not possible do simply change the value of 4 to 10 if I realize that 10 would be better.
The main problem I see with this option is that some power-user may intend to put multiple lists l1, ..., lm into a type field. Assuming that the list lj has nj elements, the numbers of card to generate may be up to n1 times ... times nj elements. This may quickly be unreasonnable. This would mainly be a problem for the user, reviewing a lot of cards is not necessarily usefull. But it would also be a technical problem because each cards has a name. For clozed cards, the name depends on the card number. Here the name would depends of multiple number, it should be sure that we find a correct method to generate name, without ambiguity, and which does not vary if the content of a note vary. The name could be card_n1_..._nj but its not really beautiful nor practical when a card's type is changed. (Technical note: Actually, in the database, the card's number is used instead of its name. Here, I could state that the card n1 ... nj would be numbered as 2n1 times .... times pj^nj, with pj being the jth prime. But it would means that the length of the card number is linear in the number of card, which is technically ugly and innefficient.
Concerning the input, I think there should be at least two distinct kinds of input. The field should be either a text or a list. Nothing should be changed for the text field (what already exists). For a field F which is a list, the interface would have a button (+), stating to add a new text input for F.
Or maybe, each elements should be entered in a single text input area, with a special separator symbol. The separator should probably be a parameter, either in the add/edit window, or in the template. For example, it makes sens to consider that the separator of a lyric is the newline. But it would also makes sens to accept that the user just copy-paste the list of elements they want to learn, separated by a comma or a tab. (à la CSV)
I don't know enough about database to know the ideal way to obtain a column of a table which is a list of things. So I do hope that it would not be particularly complicated. I can imagine multiple solutions, but I don't know what is the best practice. But since, in the current database, a note is a list of field with a separator symbol, I guess it would not be really complicated to add a second separator.