functional

package
v0.0.0-...-afa4f78 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Example (CreateLargerThanPredicate)
out := filter([]int{1, 2, 3, 4, 5, 6}, createLargerThanPredicate(3))
fmt.Println(out)
Output:

[4 5 6]
Example (Partial)
bucky := maleHavaneseSpawner("bucky")
rocky := maleHavaneseSpawner("rocky")
tipsy := femalePoodleSpawner("tipsy")
fmt.Printf("%v\n", bucky)
fmt.Printf("%v\n", rocky)
fmt.Printf("%v\n", tipsy)
Output:

{bucky 1 0}
{rocky 1 0}
{tipsy 3 1}

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Breed

type Breed int
const (
	Bulldog Breed = iota
	Havanese
	Cavalier
	Poodle
)

type Dog

type Dog struct {
	Name   Name
	Breed  Breed
	Gender Gender
}

type Gender

type Gender int
const (
	Male Gender = iota
	Female
)

type Name

type Name string

type NameToDogFunc

type NameToDogFunc func(Name) Dog

func DogSpawner

func DogSpawner(breed Breed, gender Gender) NameToDogFunc

Jump to

Keyboard shortcuts

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