Reworked filters

This commit is contained in:
obscuren
2014-09-14 00:13:23 +02:00
parent 96cf6fc147
commit 2fb57b2ea7
4 changed files with 68 additions and 95 deletions

View File

@ -20,6 +20,10 @@ func NewList(t interface{}) *List {
return &List{list, list.Len()}
}
func EmptyList() *List {
return NewList([]interface{}{})
}
// Get N element from the embedded slice. Returns nil if OOB.
func (self *List) Get(i int) interface{} {
if self.list.Len() > i {