func IvalIface(iv Ivalue) interface{} {
	switch iv.(type) {
	case bool:
		return iv.(bool)
	case int:
		return iv.(int)
	case int8:
		return iv.(int8)
	case int16:
		return iv.(int16)
	case int32:
		return iv.(int32)
	case int64:
		return iv.(int64)
	case uint:
		return iv.(uint)
	case uint8:
		return iv.(uint8)
	case uint16:
		return iv.(uint16)
	case uint32:
		return iv.(uint32)
	case uint64:
		return iv.(int64)
	case uintptr:
		return iv.(uintptr)
	case float32:
		return iv.(float32)
	case float64:
		return iv.(float64)
	case complex64:
		return iv.(complex64)
	case complex128:
		return iv.(complex128)
	case string:
		return iv.(string)
	case iface:
		return IvalIface(iv.(iface).v)
	case []Ivalue:
		return IvalIfaceSlice(iv.([]Ivalue))
	case array:
		return IvalIfaceSlice(iv.([]Ivalue))  
	case structure:
		return IvalIfaceSlice(iv.([]Ivalue))  
	}
	return interface{}(iv)
}
IvalIface converts an Ivalue into an interface{}.
package interp
type Externals struct {
	funcs map[string]externalFn
}
func NewExternals() *Externals {
	return &Externals{
		funcs: make(map[string]externalFn),
	}
}
func (ext *Externals) AddExtFunc(name string, fn func([]Ivalue) Ivalue) {
	ext.funcs[name] = func(fr *frame, args []Ivalue) Ivalue {
		return fn(args)
	}
}
func IvalIfaceSlice(ivs []Ivalue) []interface{} {
	rets := make([]interface{}, len(ivs))
	for i, v := range ivs {
		rets[i] = IvalIface(v)
	}
	return rets
}