stack

package
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 11, 2021 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Stack

type Stack struct {
	// contains filtered or unexported fields
}

func NewStack

func NewStack(t time.Time) Stack

func (*Stack) Clone

func (s *Stack) Clone(o Stack)

func (*Stack) FutureLen

func (s *Stack) FutureLen() int

func (*Stack) Insert

func (s *Stack) Insert(h internal.Hash, t time.Time, memorize bool)

Insert the card into either the review stack or future stack. Order depends on date and order inserted.

func (*Stack) List

func (s *Stack) List() []internal.Hash

Guarantees a list sorted by date, then insertion order if there are conflicts.

func (*Stack) Pop

func (s *Stack) Pop()

func (*Stack) ReviewLen

func (s *Stack) ReviewLen() int

func (*Stack) SetTime

func (s *Stack) SetTime(t time.Time)

func (*Stack) Time

func (s *Stack) Time() time.Time

func (*Stack) Top

func (s *Stack) Top() *internal.Hash

func (*Stack) Update

func (s *Stack) Update(h internal.Hash, t time.Time, memorize bool) bool

Updates both the current time that the stack holds, and also the card that was reviewed.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL