py/test.go
2014-03-02 15:28:48 +01:00

29 lines
510 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),
Join(", ", []interface{}{2,-2.33,true,"hi",}),
//Input("Say hi! "),
}
fmt.Println(Join("\n",test))
}