sfish

package
v0.0.0-...-07010e4 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Reduce

func Reduce(p *Pair)

Types

type Element

type Element interface {
	String() string
	Magnitude() int
	Clone() Element
}

type Pair

type Pair struct {
	Left  Element
	Right Element
}

func Add

func Add(p1, p2 *Pair) *Pair

func Parse

func Parse(s string) (*Pair, error)

func (*Pair) Clone

func (p *Pair) Clone() Element

func (*Pair) Magnitude

func (p *Pair) Magnitude() int

func (*Pair) String

func (p *Pair) String() string

type Regular

type Regular int

func (Regular) Clone

func (r Regular) Clone() Element

func (Regular) Magnitude

func (r Regular) Magnitude() int

func (Regular) String

func (r Regular) String() string

Jump to

Keyboard shortcuts

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