Scalave

June 09, 2014

Scalave logo
Scalave logo

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 {
      def add(a: Int, b: Int): Int = a + b
    }

    val x = 11
    val y = 31

    Maths.add(x, y)

  </script>