Compile error during setting up

30 views
Skip to first unread message

mpalg...@gmail.com

unread,
Oct 24, 2018, 1:35:06 PM10/24/18
to scala-functional
When I try compile after entering project exercises command, I get the following error in the Parsers.scala file: Please help! TIA.

sbt:exercises> compile

[info] Updating ...

[info] Done updating.

[info] Compiling 22 Scala sources to /Users/mkaruppayya/fpinscala/exercises/target/scala-2.12/classes ...

[error] /Users/mkaruppayya/fpinscala/exercises/src/main/scala/fpinscala/parsing/Parsers.scala:28:39: value drop is not a member of java.util.stream.Stream[String]

[error]     if (input.length > 1) input.lines.drop(line-1).next

[error]                                       ^

[error] one error found

[error] (Compile / compileIncremental) Compilation failed

[error] Total time: 5 s, completed Oct 24, 2018, 10:23:34 AM

Brian Maso

unread,
Oct 24, 2018, 1:41:53 PM10/24/18
to scala-fu...@googlegroups.com
That's a java.util.stream.Stream... I assume you are trying to use Scala stream, which definitely does have a "drop" method.

Brian Maso

--
You received this message because you are subscribed to the Google Groups "scala-functional" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-function...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Best regards,
Brian Maso
(949) 395-8551
Follow me: @bmaso
br...@blumenfeld-maso.com
Reply all
Reply to author
Forward
0 new messages