Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bash-3.2$ scalac Stream.scala
- Stream.scala:17: error: not found: type A
- def headOption: Option[A] = this match {
- ^
- Stream.scala:18: error: pattern type is incompatible with expected type;
- found : Empty.type
- required: Stream.type
- case Empty => None
- ^
- Stream.scala:19: error: constructor cannot be instantiated to expected type;
- found : Cons[A]
- required: Stream.type
- case Cons(h, t) => Some(h())
- ^
- three errors found
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement