asdf2014 / gitment

Gitment for My Blog
https://yuzhouwan.com
1 stars 0 forks source link

Scala 实战 | 宇宙湾 #54

Open asdf2014 opened 5 years ago

asdf2014 commented 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