mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-30 15:01:35 +00:00
55966c7e07
* Draft of iterator and enumerator * Added iterator API to the syscall mapping * Added draft of the enumerator.go file * Added enumerator interop API. * Updated the changelog Imported from CityOfZion/neo-storm (156093318b8612e810965bb1ea26e1babfb46cdd).
29 lines
732 B
Go
29 lines
732 B
Go
package enumerator
|
|
|
|
// Package enumerator provides function signatures that can be used inside
|
|
// smart contracts that are written in the neo-storm framework.
|
|
|
|
// TODO: Check enumerator use cases and add them to the examples folder.
|
|
|
|
// Enumerator stubs a NEO enumerator type.
|
|
type Enumerator struct{}
|
|
|
|
// Create creates a new enumerator from the given items.
|
|
func Create(items []interface{}) Enumerator {
|
|
return Enumerator{}
|
|
}
|
|
|
|
// Next returns the next item in the iteration.
|
|
func Next(e Enumerator) interface{} {
|
|
return nil
|
|
}
|
|
|
|
// Value returns the enumerator value.
|
|
func Value(e Enumerator) interface{} {
|
|
return nil
|
|
}
|
|
|
|
// Concat concats the 2 given enumerators.
|
|
func Concat(a, b Enumerator) Enumerator {
|
|
return Enumerator{}
|
|
}
|