Permalink
Browse files

Updated docs for First() and Last()

  • Loading branch information...
1 parent 48de68c commit 076667ebf2ef07d7d8f7db30a8e30819194cedbe @trtstm trtstm committed Feb 28, 2014
Showing with 4 additions and 2 deletions.
  1. +4 −2 array.go
View
@@ -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)
}

0 comments on commit 076667e

Please sign in to comment.