fun

package module
v0.0.0-...-8b133c7 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2015 License: MIT Imports: 5 Imported by: 0

README

FunGo

Fun Go

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func First

func First(slice interface{}) (elem interface{})

func Last

func Last(slice interface{}) (elem interface{})

func Map

func Map(xs, f interface{}) interface{}
Example
lens := Map([]string{"hi", "hoe", "silver-lining"}, func(str string) int {
	return len(str)
}).([]int)
fmt.Println(lens)
Output:

[2 3 13]

func Parallel

func Parallel(args ...interface{}) errs.Err
Example
Parallel(f1, f2, f3, func(f1res, f2res string, f3res int, err errs.Err) {
	fmt.Println(f1res, f2res, f3res)
})
Output:

From p1 From p2 123

func Parallel2

func Parallel2(funs ...interface{}) ([]interface{}, errs.Err)

Types

This section is empty.

Directories

Path Synopsis
sql

Jump to

Keyboard shortcuts

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