- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
Method to subtract a List from another
Tue, 2009-03-03, 16:32
I'm trying scala after a long time, so this may be an easy question:
$ scala
Welcome to Scala version 2.7.0-final (Java HotSpot(TM) Client VM, Java 1.6.0_07)
.
Type in expressions to have them evaluated.
Type :help for more information.
scala> List(1,2,3,4)
res0: List[Int] = List(1, 2, 3, 4)
scala> List(2,3)
res1: List[Int] = List(2, 3)
scala> res0 -- res1
<console>:7: error: value -- is not a member of List[Int]
res0 -- res1
^
Regards,
aMit
$ scala
Welcome to Scala version 2.7.0-final (Java HotSpot(TM) Client VM, Java 1.6.0_07)
.
Type in expressions to have them evaluated.
Type :help for more information.
scala> List(1,2,3,4)
res0: List[Int] = List(1, 2, 3, 4)
scala> List(2,3)
res1: List[Int] = List(2, 3)
scala> res0 -- res1
<console>:7: error: value -- is not a member of List[Int]
res0 -- res1
^
Regards,
aMit
2009/3/3 Amit Dev <amitdev@gmail.com>