py/test.go
2014-03-01 16:48:45 +01:00

28 lines
457 B
Go

package main
import (
. "./py"
"fmt"
)
func main(){
test := []interface{}{
Sum(Map(func (x int) int {return x*x}, Range(30))),
Chr(89),
Ord("a"),
Bin(144),
Hex(5831),
Bool(1.2),
Abs(-19.3),
Pow(2,16),
Type(true),
Open("test.txt", "a+"),
Any([]interface{}{0, 1, []int{}, ""}),
All([]interface{}{true,"",1}),
Min([]float64{3.14159,23.14069,2.71828}),
Max(-3,24,1,-23,31),
Input("Scrivi qualcosa: "),
}
fmt.Println(test)
}