py/test.go

26 lines
390 B
Go
Raw Normal View History

2014-02-21 21:25:11 +01:00
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("ciao2.txt", "a"),
Any([]interface{}{0, 1, []int{}, ""}),
All([]interface{}{true,"",1}),
Input("Scrivi qualcosa: "),
}
2014-02-21 21:25:11 +01:00
fmt.Println(test)
}