func drop(while) of Array in swift does not work properly

后端 未结 0 621
忘了有多久
忘了有多久 2020-12-09 10:22

In Xcode 11.3 or 12.2 Sample code:

    let numbers = [1, 2, 3, 4, 5, 6]

    let dropSlices = numbers.drop {
        $0 > 3
    }
    print(dropSlices)


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题