package main

import "fmt"

type Number interface {
	~int | ~int8 | ~int16 | ~int32 | ~int64 | ~uint | ~uint8 | ~uint16 |
		~uint32 | ~uint64 | ~float32 | ~float64
}

func NumDoubler[T Number](val T) T {
	return val * 2
}

func main() {
	val := 10.3
	fmt.Println(val)
	val = NumDoubler(val)
	fmt.Println(val)
	val = NumDoubler(val)
	fmt.Println(val)
	val = NumDoubler(val)
	fmt.Println(val)
	val = NumDoubler(val)
	fmt.Println(val)
	val = NumDoubler(val)
	fmt.Println(val)
}
