--- a/progs/lecture1.scala Thu Nov 02 14:47:55 2017 +0000
+++ b/progs/lecture1.scala Sat Nov 04 16:17:19 2017 +0000
@@ -226,7 +226,7 @@
gcd_db(48, 18)
-// Assert/Testing
+// Asserts/Testing
//================
assert(gcd(48, 18) == 6)
@@ -302,7 +302,7 @@
// function for looking up stockmarket data
-def price_lookup(symbol: String): String = {
+def price_lookup(symbol: String) : String = {
val url = "https://download.finance.yahoo.com/d/quotes.csv?s=" + symbol + "&f=snl1"
Source.fromURL(url).mkString.drop(1).dropRight(2)
}
@@ -373,11 +373,12 @@
// run Scala on the commandline. There are also at least
// four IDEs you can use with Scala:
//
-// (0) Some general information for setting up IDEs
+// (0) Some general information about setting up IDEs
// with Scala support can be found at
//
// http://docs.scala-lang.org/getting-started.html
//
+//
// (1) Eclipse for Scala (one big bundle)
//
// http://scala-ide.org/download/sdk.html
@@ -388,7 +389,7 @@
// http://docs.scala-lang.org/getting-started-intellij-track/getting-started-with-scala-in-intellij.html
//
// (3) Sublime (not free, but unlimited trial period;
-// needs SublimeREPL plugin)
+// needs Scala and SublimeREPL plugin)
//
// https://www.sublimetext.com
//
@@ -406,6 +407,13 @@
//
// There is also Scala support in the Atom editor, but my
// experience is mixed. People also use Scala with Vim and Jedit.
+// Finally there is an online editor specifically designed for
+// running Scala applications (but do not blame mne if you lose all
+// what you typed in):
+//
+// https://scalafiddle.io
+//
+//
//
// All of the IDEs above support a REPL for Scala. Some of them have
// the very nifty feature of a Scala Worksheet -- you just save your
@@ -415,6 +423,7 @@
//
//
// Scala Library Docs
+//====================
//
// http://www.scala-lang.org/api/current/
//