     assert(-1 == chop(8, [1, 3, 5, 7]))
 }
 
-let test = [1]
+let test = [1, 2, 3, 4]
+//chop(value: 3, list: test, l: 0, r: test.count-1)
 // test.split().left.split()
 // test.asRangeCovers(value: 6)
 // let x = Array(test[0 ..< test.count/2])

    return -1
}

extension Array {
    // Divides the array into two subarrays and returns a tuple (left:, right:) containing them.
    func split() -> (left: [Element], right: [Element])? {

import Foundation

// A contorted variation of http://codekata.com/kata/kata02-karate-chop/

func chop(_ value: Int, _ list: [Int]) -> Int {
