Updated docs for First() and Last()

This commit is contained in:
tnt
2014-02-28 21:55:18 +01:00
parent 48de68c2b7
commit 076667ebf2
+4 -2
View File
@@ -5,13 +5,15 @@ import (
)
// First() reduces the set of matched elements to the first in the set.
// It returns a new Selection object.
// It returns a new Selection object, and an empty Selection object if the
// the selection is empty.
func (this *Selection) First() *Selection {
return this.Eq(0)
}
// Last() reduces the set of matched elements to the last in the set.
// It returns a new Selection object.
// It returns a new Selection object, and an empty Selection object if
// the selection is empty.
func (this *Selection) Last() *Selection {
return this.Eq(-1)
}