2012-03-17から1日間の記事一覧
リスト先頭から指定要素数の後のリストを得る。( drop ) scala> val foo = List(4, 5, 6, 7) foo: List[Int] = List(4, 5, 6, 7) scala> foo.drop(2) res0: List[Int] = List(6, 7) scala> foo.drop(1) res1: List[Int] = List(5, 6, 7) scala> foo.drop(3) …
リスト先頭から指定要素数の後のリストを得る。( drop ) scala> val foo = List(4, 5, 6, 7) foo: List[Int] = List(4, 5, 6, 7) scala> foo.drop(2) res0: List[Int] = List(6, 7) scala> foo.drop(1) res1: List[Int] = List(5, 6, 7) scala> foo.drop(3) …