goder

command module
v0.0.0-...-cd1be7c Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2023 License: MIT Imports: 24 Imported by: 0

README

Goder

Description

Goder enables gophers to compate using generics and external packages.

Installation

$ go install github.com/earlgray283/goder@latest

Usage

$ goder examples/samber_lo.go
package main

import (
	"fmt"
	"strconv"
)

func main() {
	a := []int{1, 2, 3, 4, 5}
	b := MapXvlbzgba(a, func(t int, _ int) string {
		return strconv.Itoa(t)
	})
	fmt.Println(a, b)
}
func MapXvlbzgba(collection []int, iteratee func(int, int) string) []string {
	result := make([]string, len(collection))
	for i, item := range collection {
		result[i] = iteratee(item, i)
	}
	return result
}

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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