I suppose that the description of A->B fits well with the idea of
programmed learning[1] and CodeAcademy basically fits that kind of pedagogy. The limits of CodeAcademy and programmed learning are that ->B is tuned to the provider's goals rather than the student's.
[1]: https://en.wikipedia.org/wiki/Programmed_learning