@@ -32,15 +32,15 @@ func SortStringAscending(input ...interface{}) []interface{} {
3232func TestCompose (t * testing.T ) {
3333 var expectedinteger int
3434
35- var fn01 = func (args ... interface {}) []interface {} {
35+ fn01 : = func (args ... interface {}) []interface {} {
3636 val , _ := Maybe .Just (args [0 ]).ToInt ()
3737 return SliceOf (val + 1 )
3838 }
39- var fn02 = func (args ... interface {}) []interface {} {
39+ fn02 : = func (args ... interface {}) []interface {} {
4040 val , _ := Maybe .Just (args [0 ]).ToInt ()
4141 return SliceOf (val + 2 )
4242 }
43- var fn03 = func (args ... interface {}) []interface {} {
43+ fn03 : = func (args ... interface {}) []interface {} {
4444 val , _ := Maybe .Just (args [0 ]).ToInt ()
4545 return SliceOf (val + 3 )
4646 }
@@ -68,7 +68,6 @@ func TestCompose(t *testing.T) {
6868
6969 expectedinteger = 6
7070 assert .Equal (t , expectedinteger , Pipe (fn01 , fn02 , fn03 )((0 ))[0 ])
71-
7271}
7372
7473func TestFPFunctions (t * testing.T ) {
@@ -98,7 +97,6 @@ func TestFPFunctions(t *testing.T) {
9897 var actualMap map [interface {}]interface {}
9998
10099 fib := func (n int ) int {
101-
102100 result , _ := Trampoline (func (input ... interface {}) ([]interface {}, bool , error ) {
103101 n , _ := Maybe .Just (input [0 ]).ToInt ()
104102 a , _ := Maybe .Just (input [1 ]).ToInt ()
@@ -237,7 +235,6 @@ func TestFPFunctions(t *testing.T) {
237235 aVal , _ := Maybe .Just (a ).ToInt ()
238236 return aVal % 2
239237 }, 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 ))
240-
241238}
242239
243240func TestVariadic (t * testing.T ) {
@@ -326,9 +323,9 @@ func TestCurry(t *testing.T) {
326323}
327324
328325func TestCompType (t * testing.T ) {
329- var compTypeA = DefProduct (reflect .Int , reflect .String )
330- var compTypeB = DefProduct (reflect .String )
331- var myType = DefSum (NilType , compTypeA , compTypeB )
326+ compTypeA : = DefProduct (reflect .Int , reflect .String )
327+ compTypeB : = DefProduct (reflect .String )
328+ myType : = DefSum (NilType , compTypeA , compTypeB )
332329
333330 assert .Equal (t , true , myType .Matches ((1 ), ("1" )))
334331 assert .Equal (t , true , myType .Matches (("2" )))
@@ -341,9 +338,9 @@ func TestCompType(t *testing.T) {
341338}
342339
343340func TestPatternMatching (t * testing.T ) {
344- var compTypeA = DefProduct (reflect .Int , reflect .String )
345- var compTypeB = DefProduct (reflect .String , reflect .String )
346- var myType = DefSum (NilType , compTypeA , compTypeB )
341+ compTypeA : = DefProduct (reflect .Int , reflect .String )
342+ compTypeB : = DefProduct (reflect .String , reflect .String )
343+ myType : = DefSum (NilType , compTypeA , compTypeB )
347344
348345 assert .Equal (t , true , compTypeA .Matches (1 , "3" ))
349346 assert .Equal (t , false , compTypeA .Matches (1 , 3 ))
@@ -352,7 +349,7 @@ func TestPatternMatching(t *testing.T) {
352349 assert .Equal (t , true , myType .Matches ("1" , "3" ))
353350 assert .Equal (t , false , myType .Matches (1 , 3 ))
354351
355- var patterns = []Pattern {
352+ patterns : = []Pattern {
356353 InCaseOfKind (reflect .Int , func (x interface {}) interface {} {
357354 return (fmt .Sprintf ("Integer: %v" , x ))
358355 }),
@@ -369,7 +366,7 @@ func TestPatternMatching(t *testing.T) {
369366 return (fmt .Sprintf ("got this object: %v" , x ))
370367 }),
371368 }
372- var pm = DefPattern (patterns ... )
369+ pm : = DefPattern (patterns ... )
373370 assert .Equal (t , "Integer: 42" , pm .MatchFor ((42 )))
374371 assert .Equal (t , "Hello world" , pm .MatchFor (("world" )))
375372 assert .Equal (t , "Matched: ccc" , pm .MatchFor (("ccc" )))
0 commit comments