Documentation ¶
Overview ¶
Package gslice Author: hyphen Copyright 2023 hyphen. All rights reserved. Create-time: 2023/12/4
Index ¶
- func Filter[F any](s []F, fc func(F) bool) []F
- func ForEach[T any](s []T, fc func(T))
- func ForEachIdx[T any](s []T, fc func(int, T))
- func Map[F, T any](s []F, fc func(F) T) []T
- func ToMap[F, V any, K comparable](s []F, fc func(F) (K, V)) map[K]V
- func TryMap[F, T any](s []F, fc func(F) (T, error)) ([]T, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ForEachIdx ¶
func ToMap ¶
func ToMap[F, V any, K comparable](s []F, fc func(F) (K, V)) map[K]V
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.