Documentation ¶
Overview ¶
code generated by hasgo. [DO NOT EDIT!]
code generated by hasgo. [DO NOT EDIT!]
code generated by hasgo. [DO NOT EDIT!]
Index ¶
- type Bools
- type Int
- type Ints
- func (s Ints) Abs() (out Ints)
- func (s Ints) All(f func(int64) bool) bool
- func (s Ints) Any(f func(int64) bool) bool
- func (s Ints) Average() float64
- func (s Ints) Delete(e int64) (out Ints)
- func (is Ints) Equals(other Ints) bool
- func (is Ints) EqualsOrdered(other Ints) bool
- func (s Ints) Filter(f func(int64) bool) (out Ints)
- func (s Ints) Foldl(z int64, f func(e1, e2 int64) int64) (out int64)
- func (s Ints) Foldl1(f func(e1, e2 int64) int64) (out int64)
- func (s Ints) Head() (out int64)
- func (s Ints) Init() (out Ints)
- func (s Ints) Intercalate(ss [][]int64) (out Ints)
- func (s Ints) Intersperse(value int64) (out Ints)
- func (s Ints) Last() (out int64)
- func (s Ints) Length() int
- func (s Ints) Map(f func(int64) int64) (out Ints)
- func (s Ints) Maximum() (out int64)
- func (s Ints) MaximumBy(f func(e1, e2 int64) int64) (max int64)
- func (s Ints) Minimum() int64
- func (s Ints) Modes() (out Ints)
- func (s Ints) Nub() (out Ints)
- func (s Ints) Null() bool
- func (s Ints) Product() int64
- func (s Ints) Reverse() (out Ints)
- func (s Ints) Sort() Ints
- func (s Ints) Sum() int64
- func (s Ints) Tail() (out Ints)
- func (s Ints) Take(n uint64) (out Ints)
- func (s Ints) Uncons() (head int64, tail Ints)
- func (s Ints) Unlines() (out string)
- func (s Ints) Unwords() (out string)
- type Strings
- func (s Strings) All(f func(string) bool) bool
- func (s Strings) Any(f func(string) bool) bool
- func (s Strings) Delete(e string) (out Strings)
- func (is Strings) Equals(other Strings) bool
- func (is Strings) EqualsOrdered(other Strings) bool
- func (s Strings) Filter(f func(string) bool) (out Strings)
- func (s Strings) Foldl(z string, f func(e1, e2 string) string) (out string)
- func (s Strings) Foldl1(f func(e1, e2 string) string) (out string)
- func (s Strings) Head() (out string)
- func (s Strings) Init() (out Strings)
- func (s Strings) Intercalate(ss [][]string) (out Strings)
- func (s Strings) Intersperse(value string) (out Strings)
- func (s Strings) Last() (out string)
- func (s Strings) Length() int
- func (s Strings) Map(f func(string) string) (out Strings)
- func (s Strings) MaximumBy(f func(e1, e2 string) string) (max string)
- func (s Strings) Modes() (out Strings)
- func (s Strings) Nub() (out Strings)
- func (s Strings) Null() bool
- func (s Strings) Reverse() (out Strings)
- func (s Strings) Sort() Strings
- func (s Strings) Sum() string
- func (s Strings) Tail() (out Strings)
- func (s Strings) Take(n uint64) (out Strings)
- func (s Strings) Uncons() (head string, tail Strings)
- func (s Strings) Unlines() (out string)
- func (s Strings) Unwords() (out string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Ints ¶
type Ints []int64
Ints is a wrapper around []int64
func IntRange ¶
IntRange creates a range similar to list comprehension in Haskell Ranges in Haskell are _inclusive_ on both bounds. IntRange(0,10) == [0..10] == []int{0,1,2,3,4,5,6,7,8,9,10}
func IntReplicate ¶
IntReplicate creates a slice with `value` repeated `count` times
func (Ints) Abs ¶
Abs returns the absolute value of all elements in the slice. Can be generated for number-types.
func (Ints) All ¶
All returns true if all elements of the slice satisfy the predicate. Can be generated for any type.
func (Ints) Any ¶
Any returns true if any of the elements satisfy the predicate. Can be generated for any type.
func (Ints) Average ¶
Average returns the average of all elements in the slice. Can be generated for all number types.
func (Ints) Delete ¶
Delete returns a slice with the first matching element removed from the slice. Can be generated for any type.
func (Ints) Equals ¶
Equals verifies that both slices have the same elements, ignoring their position.
func (Ints) EqualsOrdered ¶
EqualsOrdered verifies that the elements in the slices are equal (same position)
func (Ints) Filter ¶
Filter returns a slice containing only the elements that match the predicate. Can be generated for any type.
func (Ints) Foldl ¶
Foldr reduces a list by iteratively applying f from left->right. Thus, for an empty slice, the result is the default zero-value.
func (Ints) Foldl1 ¶
Foldr reduces a list by iteratively applying f from left->right. Thus, for an empty slice, the result is the default zero-value.
func (Ints) Head ¶
Head returns the first element in the slice. If no element is found, returns the zero-value of the type. Can be generated for any type.
func (Ints) Init ¶
Init takes n-1 elements from a slice, where n = len(list). Can be generated for any type.
func (Ints) Intercalate ¶
Intercalate inserts the method receiver slice into the function slice at each step. Can be generated for any type.
func (Ints) Intersperse ¶
Intersperse inserts the receiving value between each element of the method receiver. Can be generated for any type.
func (Ints) Last ¶
Last returns the last element in the slice If no element is found, returns the zero-value of the type Can be generated for any type.
func (Ints) Map ¶
Map return a new slice with the map operation applied to each element. Can be generated for any type.
func (Ints) MaximumBy ¶
MaximumBy returns the maximum elements according to a custom comparator. Can be generated for any type.
func (Ints) Modes ¶
Modes returns the elements with highest frequency in the slice. Can be generated for any type.
func (Ints) Nub ¶
Nub returns a slice containing only the unique elements of the receiver. The order of the elements is preserved. Can be generated for any type.
func (Ints) Product ¶
Product returns the product of all elements in the slice. Can be generated for any number type.
func (Ints) Sum ¶
Sum returns the sum of all elements in the slice. Can be generated for any number type.
func (Ints) Tail ¶
Tail takes [1 -> n] elements from a slice, where n = len(list) Returns an empty slice if there are less than 2 elements in slice Can be generated for any type.
func (Ints) Take ¶
Take takes the first n elements of the slice, or the entire slice if n > len(slice). Can be generated for any type.
func (Ints) Uncons ¶
Uncons decomposes a slice into the head and tail component. Can be generated for any type.
type Strings ¶
type Strings []string
Strings is a wrapper around []string
func StringReplicate ¶
StringReplicate creates a slice with `value` repeated `count` times
func (Strings) All ¶
All returns true if all elements of the slice satisfy the predicate. Can be generated for any type.
func (Strings) Any ¶
Any returns true if any of the elements satisfy the predicate. Can be generated for any type.
func (Strings) Delete ¶
Delete returns a slice with the first matching element removed from the slice. Can be generated for any type.
func (Strings) Equals ¶
Equals verifies that both slices contain the same elements, regardless of position.
func (Strings) EqualsOrdered ¶
EqualsOrdered verifies that both slices contain the same elements in the same position.
func (Strings) Filter ¶
Filter returns a slice containing only the elements that match the predicate. Can be generated for any type.
func (Strings) Foldl ¶
Foldr reduces a list by iteratively applying f from left->right. Thus, for an empty slice, the result is the default zero-value.
func (Strings) Foldl1 ¶
Foldr reduces a list by iteratively applying f from left->right. Thus, for an empty slice, the result is the default zero-value.
func (Strings) Head ¶
Head returns the first element in the slice. If no element is found, returns the zero-value of the type. Can be generated for any type.
func (Strings) Init ¶
Init takes n-1 elements from a slice, where n = len(list). Can be generated for any type.
func (Strings) Intercalate ¶
Intercalate inserts the method receiver slice into the function slice at each step. Can be generated for any type.
func (Strings) Intersperse ¶
Intersperse inserts the receiving value between each element of the method receiver. Can be generated for any type.
func (Strings) Last ¶
Last returns the last element in the slice If no element is found, returns the zero-value of the type Can be generated for any type.
func (Strings) Map ¶
Map return a new slice with the map operation applied to each element. Can be generated for any type.
func (Strings) MaximumBy ¶
MaximumBy returns the maximum elements according to a custom comparator. Can be generated for any type.
func (Strings) Modes ¶
Modes returns the elements with highest frequency in the slice. Can be generated for any type.
func (Strings) Nub ¶
Nub returns a slice containing only the unique elements of the receiver. The order of the elements is preserved. Can be generated for any type.
func (Strings) Sum ¶
Sum returns the sum of all elements in the slice. Can be generated for any number type.
func (Strings) Tail ¶
Tail takes [1 -> n] elements from a slice, where n = len(list) Returns an empty slice if there are less than 2 elements in slice Can be generated for any type.
func (Strings) Take ¶
Take takes the first n elements of the slice, or the entire slice if n > len(slice). Can be generated for any type.
func (Strings) Uncons ¶
Uncons decomposes a slice into the head and tail component. Can be generated for any type.