hylang/hy — pull request #641 by microamp (2014-08-23 11:51:19+00:00)
Title: Fix #638: Make nth return default value when out of bounds

This PR fixes #638.

```hy
=> (nil? (first [])) ; no more IndexError
True
=> (nil? (nth ["a" "b"] 10)) ; nil by default
True
=> (nth (range 10) 100 "hi!") ; with default specified
'hi!'
```

Docs/tests updated accordingly. Thanks.