function touchStart(index) {
			return function (event) {
				currentIndex = index
				startPos = getPositionX(event)
				isDragging = true
				animationID = requestAnimationFrame(animation)
				slider.classList.add('grabbing')
			}
		}
// use a HOF so we have index in a closure
use a HOF so we have index in a closure
use a HOF so we have index in a closure
function touchStart(index) {
			return function (event) {
				currentIndex = index
				startPos = getPositionX(event)
				isDragging = true
				animationID = requestAnimationFrame(animation)
				slider.classList.add('grabbing')
			}
		}
function touchStart ( index ) { return function ( event ) { currentIndex = index startPos = getPositionX ( event ) isDragging = true animationID = requestAnimationFrame ( animation ) slider . classList . add ( 'grabbing' ) } }
use a HOF so we have index in a closure
use a HOF so we have index in a closure