From 6ca47df34c8c67f3164c62e7b55ad0c18e8cb9b8 Mon Sep 17 00:00:00 2001 From: han semaj Date: Wed, 3 Sep 2014 20:53:28 +1200 Subject: [PATCH] Include optional arg in docs (nth) --- docs/language/core.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/language/core.rst b/docs/language/core.rst index a05979e..e5eb774 100644 --- a/docs/language/core.rst +++ b/docs/language/core.rst @@ -532,11 +532,11 @@ Return True if x is None. nth --- -Usage: ``(nth coll n)`` +Usage: ``(nth coll n &optional [default nil])`` -Return the `nth` item in a collection, counting from 0. Return ``nil`` -if out of bounds (unless specified otherwise). Raise ``ValueError`` if -``n`` is negative. +Return the `nth` item in a collection, counting from 0. Return the +default value, ``nil``, if out of bounds (unless specified otherwise). +Raise ``ValueError`` if ``n`` is negative. .. code-block:: hy