Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updated docs for First() and Last()

  • Loading branch information...
commit 076667ebf2ef07d7d8f7db30a8e30819194cedbe 1 parent 48de68c
@siriustnt siriustnt authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 array.go
View
6 array.go
@@ -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)
}
Please sign in to comment.
Something went wrong with that request. Please try again.