func newBindingsV1(locals *ast.ValueMap) (result []*bindingV1) { result = make([]*bindingV1, 0, locals.Len()) locals.Iter(func(key, value ast.Value) bool { result = append(result, &bindingV1{ Key: &ast.Term{Value: key}, Value: &ast.Term{Value: value}, }) return false }) return result }