勉強したこと、調べたことを記録する
for(i in 0..10){ hogehoge }
myList = (1..10) def notBreak(yourList) { yourList.each { list -> if(list == 5) { return true } else { return false } } } //assert existFiveBadCase(myList) == true assert notBreak(myList) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
myList = (1..10) def doBreak(yourList) { def isExist = false yourList.find { list -> if(list == 5) { isExist = true return true } } return isExist } assert doBreak(myList) == true
0 件のコメント:
コメントを投稿