package utils

import "github.com/IBM/fp-go/internal/utils"

Index

Variables

var (
	Empty = Initial{}

	SetLastName = F.Curry2(func(name string, s1 Initial) WithLastName {
		return WithLastName{
			Initial:  s1,
			LastName: name,
		}
	})

	SetGivenName = F.Curry2(func(name string, s1 WithLastName) WithGivenName {
		return WithGivenName{
			WithLastName: s1,
			GivenName:    name,
		}
	})
)
var Upper = strings.ToUpper

Functions

func Dec

func Dec(i int) int

func Double

func Double(value int) int

func Error

func Error() (int, error)

func GetFullName

func GetFullName(s WithGivenName) string

func Inc

func Inc(i int) int

func StringLen

func StringLen(value string) int

func Sum

func Sum(left, right int) int

func Triple

func Triple(value int) int

Types

type Initial

type Initial struct {
}

type WithGivenName

type WithGivenName struct {
	WithLastName
	GivenName string
}

type WithLastName

type WithLastName struct {
	Initial
	LastName string
}

Source Files

do.go utils.go

Version
v1.0.151 (latest)
Published
Nov 23, 2024
Platform
linux/amd64
Imports
4 packages
Last checked
5 months ago

Tools for package owners.