gslice

package
v0.2.0 Latest Latest
Warning

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

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

Documentation

Overview

Package gslice Author: hyphen Copyright 2023 hyphen. All rights reserved. Create-time: 2023/12/4

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Filter

func Filter[F any](s []F, fc func(F) bool) []F

func ForEach

func ForEach[T any](s []T, fc func(T))

func ForEachIdx

func ForEachIdx[T any](s []T, fc func(int, T))

func Map

func Map[F, T any](s []F, fc func(F) T) []T

func ToMap

func ToMap[F, V any, K comparable](s []F, fc func(F) (K, V)) map[K]V

func TryMap

func TryMap[F, T any](s []F, fc func(F) (T, error)) ([]T, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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