////////////////////////////
// MAIN FUNCTION FOR TESTING
////////////////////////////
MAIN FUNCTION FOR TESTING
//////////////////////////// // MAIN FUNCTION FOR TESTING ////////////////////////////
func main() {
	var price, tip float32 = 20.00, .20
	bill := calculateBill(price, tip)
	fmt.Println("Total Bill is: ", bill)
	numOptions := permIndependantStages(2, 3, 5, 3)
	fmt.Println(numOptions)
	options := []int{2, 3, 5, 3}
	numberOfOptions := permIndependantStages(options...)
	fmt.Println(numberOfOptions)
	defer foo()
	bar()
	func() {
		fmt.Println("anonymous function")
	}()
	func(x int) {
		fmt.Println("anonymous function() = ", x)
	}(10)
	f := func() {
		fmt.Println("my first func expression")
	}
	f()
	g := func(x int) {
		fmt.Println("the year big brother started watching:", x)
	}
	g(1984)
	t := evenSum(sum, []int{1, 2, 3, 4, 5, 6, 7, 8, 9}...)
	fmt.Println(t)
	area, perimeter := rectProps(10.8, 5.6)
	fmt.Printf("Area %f Perimeter %f\n", area, perimeter)
	n := factorial(4)
	fmt.Println(n)
}
func main ( ) { var price , tip float32 = 20.00 , .20 bill := calculateBill ( price , tip ) fmt . Println ( " " , bill ) numOptions := permIndependantStages ( 2 , 3 , 5 , 3 ) fmt . Println ( numOptions ) options := [ ] int { 2 , 3 , 5 , 3 } numberOfOptions := permIndependantStages ( options ... ) fmt . Println ( numberOfOptions ) defer foo ( ) bar ( ) func ( ) { fmt . Println ( " " ) } ( ) func ( x int ) { fmt . Println ( " " , x ) } ( 10 ) f := func ( ) { fmt . Println ( " " ) } f ( ) g := func ( x int ) { fmt . Println ( " " , x ) } g ( 1984 ) t := evenSum ( sum , [ ] int { 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 } ... ) fmt . Println ( t ) area , perimeter := rectProps ( 10.8 , 5.6 ) fmt . Printf ( " \n " , area , perimeter ) n := factorial ( 4 ) fmt . Println ( n ) }
MAIN FUNCTION FOR TESTING
MAIN FUNCTION FOR TESTING
// Unfurling a slice // Defer // Anonymous Functions // Function expressions