Added few enhancements:
1) xs.length is a O(n) operation on List (it is a linked list). So it is
better to avoid it in general.
2) Made list 0-based indexes based.
3) Now checking if index < 0
Imported Await to use it