June 09, 2014
To embed Scalave on your site, add the following snippet:
<script src="//scalave.herokuapp.com/scalave.js"></script>
To provide default Scala code, simply include it within the script
element:
<script rows="8" cols="72" src="//scalave.herokuapp.com/scalave.js">
object Maths {add(a: Int, b: Int): Int = a + b
def
}
= 11
val x = 31
val y
.add(x, y)
Maths
</script>