Advertisement
Guest User

Untitled

a guest
Dec 15th, 2014
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. bash-3.2$ scalac Stream.scala
  2. Stream.scala:17: error: not found: type A
  3. def headOption: Option[A] = this match {
  4. ^
  5. Stream.scala:18: error: pattern type is incompatible with expected type;
  6. found : Empty.type
  7. required: Stream.type
  8. case Empty => None
  9. ^
  10. Stream.scala:19: error: constructor cannot be instantiated to expected type;
  11. found : Cons[A]
  12. required: Stream.type
  13. case Cons(h, t) => Some(h())
  14. ^
  15. three errors found
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement