Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Drill

func Drill(tl *timelearn.T) error

    Drill quizzes the user on the problems in the given timelearn.T task. How the questions and answers are presented is determined by the 'kind' stored when the timelearn.T database was created. New learners can be added by calling Register.

    func Register

    func Register(kind string, gen func() (UI, error))

      Register adds a new user interface. Any database with the given kind will use this function to make a new UI for it.

      Types

      type Humanized

      type Humanized int64

      func (Humanized) Format

      func (t Humanized) Format(f fmt.State, c rune)

      type UI

      type UI interface {
      	Single(prob, next *timelearn.Problem) (int, error)
      	Close() error
      }

        The UI is responsible for asking the user a question, and determining if they got it right. The prob argument will always point to the problem to learn. 'next' may point to an upcoming problem.