A modern, pragmatic systems programming language compiled directly to C with Perseus reference counting.
func splitHead(arr: [Int]) -> (Int, [Int]) {
let head = arr[0]
let rest = arr[1..=(arr.len - 1)]
return (head, rest)
}
func main() {
let (head, tail) = splitHead([10, 20, 30])
println("First: " + head.toString())
}