Documentation ¶
Overview ¶
Package types contains code generated by hasgo. [DO NOT EDIT!]
Package types contains code generated by hasgo. [DO NOT EDIT!]
Package types contains 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) Break(f func(int64) bool) (before Ints, after Ints)
- func (s Ints) Delete(e int64) (out Ints)
- func (s Ints) Drop(i int) (out Ints)
- func (s Ints) DropWhile(f func(int64) bool) (out Ints)
- func (s Ints) Elem(el int64) bool
- 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) Foldr(e int64, f func(e1, e2 int64) int64) (out int64)
- func (s Ints) Foldr1(f func(e1, e2 int64) int64) (out int64)
- func (s Ints) Group() (out [][]int64)
- func (s Ints) Head() (out int64)
- func (s Ints) Init() (out Ints)
- func (s Ints) Inits() (out [][]int64)
- func (s Ints) Intercalate(ss [][]int64) (out Ints)
- func (s Ints) Intersperse(value int64) (out Ints)
- func (s Ints) IsPrefixOf(in Ints) bool
- 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) Scanl(e int64, f func(e1, e2 int64) int64) (out Ints)
- func (s Ints) Sort() Ints
- func (s Ints) Span(f func(int64) bool) (before Ints, after Ints)
- func (s Ints) SplitAt(i int) (before, after Ints)
- func (s Ints) Sum() int64
- func (s Ints) Tail() (out Ints)
- func (s Ints) Tails() (out [][]int64)
- func (s Ints) Take(n uint64) (out Ints)
- func (s Ints) TakeWhile(p func(int64) bool) (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) Break(f func(string) bool) (before Strings, after Strings)
- func (s Strings) Delete(e string) (out Strings)
- func (s Strings) Drop(i int) (out Strings)
- func (s Strings) DropWhile(f func(string) bool) (out Strings)
- func (s Strings) Elem(el string) bool
- 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) Foldr(e string, f func(e1, e2 string) string) (out string)
- func (s Strings) Foldr1(f func(e1, e2 string) string) (out string)
- func (s Strings) Group() (out [][]string)
- func (s Strings) Head() (out string)
- func (s Strings) Init() (out Strings)
- func (s Strings) Inits() (out [][]string)
- func (s Strings) Intercalate(ss [][]string) (out Strings)
- func (s Strings) Intersperse(value string) (out Strings)
- func (s Strings) IsPrefixOf(in Strings) bool
- 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) Scanl(e string, f func(e1, e2 string) string) (out Strings)
- func (s Strings) Sort() Strings
- func (s Strings) Span(f func(string) bool) (before Strings, after Strings)
- func (s Strings) SplitAt(i int) (before, after Strings)
- func (s Strings) Sum() string
- func (s Strings) Tail() (out Strings)
- func (s Strings) Tails() (out [][]string)
- func (s Strings) Take(n uint64) (out Strings)
- func (s Strings) TakeWhile(p func(string) bool) (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) Break ¶
Break returns a tuple of any elements that do not satisfy the predicate up until the first time it passes, followed by the rest of the elements. Can be generated on any type.
func (Ints) Delete ¶
Delete returns a slice with the first matching element removed from the slice. Can be generated for any type.
func (Ints) Drop ¶
Drop returns a new Slice with the elements after the provided key. Can be generated for any type.
func (Ints) DropWhile ¶
DropWhile returns a new slice containing all elements after the predicate fails for the first time. Can be generated for any type.
func (Ints) Elem ¶
Elem returns true if the slice contains the element 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 ¶
Foldl 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 ¶
Foldl1 reduces a list by iteratively applying f from left->right. Thus, for an empty slice, the result is the default zero-value.
func (Ints) Foldr ¶
Foldr reduces a list by iteratively applying f from right -> left. Thus, for an empty slice, the result is the default zero-value.
func (Ints) Foldr1 ¶
Foldr1 reduces a list by iteratively applying f from right -> left. Thus, for an empty slice, the result is the default zero-value.
func (Ints) Group ¶
Group returns a list of lists where each list contains only equal elements and the concatenation of the result is equal to the argument. Can be generated for any type.
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) Inits ¶
Inits returns all inits of a sequence, in order of small to large, as if it were called recursively. 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) IsPrefixOf ¶
IsPrefixOf returns true if the current sliceType is a prefix of the passed one. Can be generated for any time.
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) Scanl ¶
Scanl reduces a list by iteratively applying f from left->right and then returns each iteration in a slice.
func (Ints) Span ¶
Span returns a tuple of any elements that satisfy the predicate up until the first failure, followed by the rest of the elements. Can be generated for any type.
func (Ints) SplitAt ¶
SplitAt splits the slice at the given index, returning before and after as a tuple. Can be generated for any 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) Tails ¶
Tails returns all tails of a sequence, in order of large to small, as if it were called recursively. 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) TakeWhile ¶
TakeWhile continues appending to the output as long as the predicate is satisfied. 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) Break ¶
Break returns a tuple of any elements that do not satisfy the predicate up until the first time it passes, followed by the rest of the elements. Can be generated on 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) Drop ¶
Drop returns a new Slice with the elements after the provided key. Can be generated for any type.
func (Strings) DropWhile ¶
DropWhile returns a new slice containing all elements after the predicate fails for the first time. Can be generated for any type.
func (Strings) Elem ¶
Elem returns true if the slice contains the element 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 ¶
Foldl 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 ¶
Foldl1 reduces a list by iteratively applying f from left->right. Thus, for an empty slice, the result is the default zero-value.
func (Strings) Foldr ¶
Foldr reduces a list by iteratively applying f from right -> left. Thus, for an empty slice, the result is the default zero-value.
func (Strings) Foldr1 ¶
Foldr1 reduces a list by iteratively applying f from right -> left. Thus, for an empty slice, the result is the default zero-value.
func (Strings) Group ¶
Group returns a list of lists where each list contains only equal elements and the concatenation of the result is equal to the argument. Can be generated for any type.
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) Inits ¶
Inits returns all inits of a sequence, in order of small to large, as if it were called recursively. 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) IsPrefixOf ¶
IsPrefixOf returns true if the current sliceType is a prefix of the passed one. Can be generated for any time.
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) Scanl ¶
Scanl reduces a list by iteratively applying f from left->right and then returns each iteration in a slice.
func (Strings) Span ¶
Span returns a tuple of any elements that satisfy the predicate up until the first failure, followed by the rest of the elements. Can be generated for any type.
func (Strings) SplitAt ¶
SplitAt splits the slice at the given index, returning before and after as a tuple. 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) Tails ¶
Tails returns all tails of a sequence, in order of large to small, as if it were called recursively. 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) TakeWhile ¶
TakeWhile continues appending to the output as long as the predicate is satisfied. 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.