https://scalataiwan.github.io/ScalaKitchen/
或 google "ScalaKitchen" (不要空格)
Slide 5
Slide 5 text
● 中文版
● Start coding without installation.
○ Java(x), REPL(x), sbt(x), browser(o)
● Designed for beginners without native lang.
● Avoid mentioning features that we seldom use.
○ var(x), while(x), return(x)
Slide 6
Slide 6 text
val if def block Seq infix API
Map tuple
⇒
practices
String map
flatMap
I/O
REPL
install
sbt
main
package immutable
par
tailrec for
class
object
fold curry
trait case class
apply
match
implicit Option
try
Stream ?
typeclass Monad Cats
plugin
Spark Play
Akka
ScalaJS
Future
JSON SQL
Actor
Streaming MLlib
publish
events books Reactive Stream
Slide 7
Slide 7 text
https://scalafiddle.io
Slide 8
Slide 8 text
Scala
JavaScript
write your code
(1)
run the program
in your browser
(3)
compile by
Scala.js
(2)
Slide 9
Slide 9 text
markdown
$ sbt ornate
html
The Cooking Integration
of ScalaKitchen
## If Expression
Scala 的 if expression 由上面三個區塊構成,▢ 的部份
需要是一個 `Boolean`,例如 `true`、`false`、`2 > 1`、`a
== b`,或 `3 <= 4 && "a" != "b"`。
△ 與 ◯ 的部份則可以填入一個單純的 值、一個 block
`{...}` (後面會提到)、或是再塞入另一個 if expression。
由於整個 if expression 最後會帶著一個值,所以我們
可以再用一個 `val` 去把整個 expression 的值接住:
Slide 13
Slide 13 text
No content
Slide 14
Slide 14 text
modify the code and
save on ScalaFiddle
modify the iframe id
in our markdown
麻 煩!
Slide 15
Slide 15 text
## If Expression
Scala 的 if expression 由上面三個區塊構成,▢ 的部份
需要是一個 `Boolean`,例如 `true`、`false`、`2 > 1`、`a
== b`,或 `3 <= 4 && "a" != "b"`。
△ 與 ◯ 的部份則可以填入一個單純的 值、一個 block
`{...}` (後面會提到)、或是再塞入另一個 if expression。
由於整個 if expression 最後會帶著一個值,所以我們
可以再用一個 `val` 去把整個 expression 的值接住:
```scalaFiddle
val a = if (1 < 2) 10 else 11
val b = if (a == 11) {
"A" + "B"
} else "C" + "D"
what we want
Slide 16
Slide 16 text
ScalaTaiwan / ornate-scalafiddle
(An Ornate extension written by Walter.)
Slide 17
Slide 17 text
modify the code and
save on ScalaFiddle
modify the iframe id
in our markdown
Just modify the code
in our markdown!!
Slide 18
Slide 18 text
How to Contribute?
● Pick and write a section in the roadmap.
(please notify me first)
● Suggestion for the roadmap design.
● Correct the bugs in current content.
● Customize ScalaFiddle for our need.
○ Better UI on mobile view.
○ Judging system. Show students' statuses in realtime.
● Play with it / Promote it / Ask questions.
Slide 19
Slide 19 text
Thank you
>>> https://scalataiwan.github.io/ScalaKitchen/