File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,11 +17,13 @@ import _nth from './internal/_nth.js';
1717 * @see R.tail, R.init, R.last
1818 * @example
1919 *
20- * R.head(['fi', 'fo', 'fum']); //=> 'fi'
21- * R.head([]); //=> undefined
20+ * R.head([1, 2, 3]); //=> 1
21+ * R.head([1]); //=> 1
22+ * R.head([]); //=> undefined
2223 *
23- * R.head('abc'); //=> 'a'
24- * R.head(''); //=> undefined
24+ * R.head('abc'); //=> 'a'
25+ * R.head('a'); //=> 'a'
26+ * R.head(''); //=> undefined
2527 */
2628var head = _curry1 ( function ( list ) {
2729 return _nth ( 0 , list ) ;
Original file line number Diff line number Diff line change @@ -16,11 +16,13 @@ import _nth from './internal/_nth.js';
1616 * @see R.init, R.head, R.tail
1717 * @example
1818 *
19- * R.last(['fi', 'fo', 'fum']); //=> 'fum'
20- * R.last([]); //=> undefined
19+ * R.last([1, 2, 3]); //=> 3
20+ * R.last([1]); //=> 1
21+ * R.last([]); //=> undefined
2122 *
22- * R.last('abc'); //=> 'c'
23- * R.last(''); //=> undefined
23+ * R.last('abc'); //=> 'c'
24+ * R.last('a'); //=> 'a'
25+ * R.last(''); //=> undefined
2426 */
2527var last = _curry1 ( function ( list ) {
2628 return _nth ( - 1 , list ) ;
You can’t perform that action at this time.
0 commit comments