Open asdf2014 opened 5 years ago
https://yuzhouwan.com/posts/18651/
实用技巧List1234567List(1, 9, 2, 4, 5) span ( < 3) // (List(1), List(9, 2, 4, 5)) 碰到不符合就结束List(1, 9, 2, 4, 5) partition ( < 3) // (List(1, 2), List(9, 4, 5)) 扫描所有List(1, 9, 2, 4, 5) split
https://yuzhouwan.com/posts/18651/
实用技巧List1234567List(1, 9, 2, 4, 5) span ( < 3) // (List(1), List(9, 2, 4, 5)) 碰到不符合就结束List(1, 9, 2, 4, 5) partition ( < 3) // (List(1, 2), List(9, 4, 5)) 扫描所有List(1, 9, 2, 4, 5) split