Recent public codes are listed below. You can filter them by the following programming languages:
- view
- All
- Ada
- Assembler
- Assembler
- AWK (gawk)
- AWK (mawk)
- Bash
- bc
- Brainf**k
- C
- C#
- C++
- C++0x
- C99 strict
- CLIPS
- Clojure
- COBOL
- COBOL 85
- Common Lisp (clisp)
- D (dmd)
- Erlang
- F#
- Factor
- Falcon
- Forth
- Fortran
- Go
- Groovy
- Haskell
- Icon
- Intercal
- Java
- Java7
- JavaScript (rhino)
- JavaScript (spidermonkey)
- Lua
- Nemerle
- Nice
- Nimrod
- Objective-C
- Ocaml
- Oz
- Pascal (fpc)
- Pascal (gpc)
- Perl
- Perl 6
- PHP
- Pike
- Prolog (gnu)
- Prolog (swi)
- Python
- Python 3
- R
- Ruby
- Scala
- Scheme (guile)
- Smalltalk
- SQL
- Tcl
- Text
- Unlambda
- VB.NET
- Whitespace
-
1 2 3 4 5 6 7 8 9
class Main { def doIt(l : MyList) : Int = { l match { case Nil() => print(0) 0 case Cons(v,t) => print(v + doIt(t))
...
-
1 2 3 4 5 6 7 8 9
def doIt(l : MyList) : Int = { l match { case Nil() => print(0) 0 case Cons(v,t) => print(v + doIt(t)) v }
...
-
1 2 3 4 5 6 7 8
object Main { def cast[A](x: Any) = x.asInstanceOf[A] def main(args: Array[String]): Unit = { println(cast[Long](9).getClass()) println(cast[String](9).getClass()) } }
...
-
1 2 3 4 5 6 7 8
object Main { def cast[A](x: Any) = x.asInstanceOf[A] def main(args: Array[String]): Unit = { println(cast[Long](9).getClass()) println(cast[String](9).getClass()) } }
...
-
1 2 3 4 5 6 7 8
object Main { class Foo class Bar { def baz = println("woof") } def taz(b: Bar) = println("bow")
...
-
1 2 3 4 5 6 7 8 9
import Predef.{int2long => _, _} object Main { def main(args: Array[String]): Unit = { // The following won't compile: val x: Long = 4 // The following will: println(4.asInstanceOf[Long])
...
-
1 2 3 4 5 6 7
import Predef.{int2long => _, _} object Main { def main(args: Array[String]): Unit = { println(4.asInstanceOf[Long]) } }
-
1 2 3 4 5 6 7
import Predef.{int2long => _} object Main { def main(args: Array[String]): Unit = { println(4.asInstanceOf[Long]) } }
-
1 2 3 4 5 6 7 8 9
class C { String x = y.toString(); int y = 3; } class Main { static main (String[] args) { System.out.println("x = "+(new C()).x); }
-
1 2 3 4 5 6 7 8 9
class C { val x : String = y.toString() val y : Int = 3 } class D { val x : String = y.toString() lazy val y : Int = 3 }
...
-
1 2 3 4 5 6 7 8 9
class C { lazy val x : String = y.toString() val y : Int = 3 } object Main { def main (args : Array[String]) { println("x = "+(new C()).x) }
-
1 2 3 4 5 6 7 8 9
class C { val x : String = y.toString() val y : Int = 3 } object Main { def main (args : Array[String]) { println("x = "+(new C()).x) }
-
1 2 3 4 5 6 7 8 9
class C { val x : String = y.toString() val y : Int = 3 } object Main { def main (Array[String] args) { println("x = "+(new C()).x) }
-
1 2 3 4 5 6 7 8 9
import java.io.{BufferedReader, InputStreamReader} object Main { def main(args: Array[String]) { var stdin = new BufferedReader(new InputStreamReader(System.in)); var line = stdin.readLine(); while(false == line.equals("42")) { System.out.println(line);
...
-
1 2 3 4 5
def func(x): return -x**3+1 print(so.fixed_point(func,0))
-
1 2 3 4 5
def func(x): return -x**3+1 print(so.fixed_point(func,0))
-
1 2 3 4 5 6
def func(x): return -x**3+1 # This finds the value of x such that func(x) = x, that is, where # -x**3 + 1 = x print(so.fixed_point(func,0))
-
1
solve(x**2,x)
-
1 2 3 4 5 6 7 8
object Main{ def doSomething(l : MyList, i : Int):MyList = { l match { case Nil() => Nil() case Cons(e,tail) if e > i => Cons(e,doSomething(tail,i)) case Cons(e,tail) => doSomething(tail,i) } }
...
-
1 2 3 4 5 6 7 8
object Main{ def doSomething(l : MyList, i : Int):MyList = { l match { case Nil() => Nil() case Cons(e,tail) if e > i => Cons(e,doSomething(tail,i)) case Cons(e,tail) => doSomething(tail,i) } }
...
-
1 2 3 4 5 6 7 8
object Main{ def doSomething(l : MyList, i : Int):MyList = { l match { case Nil() => Nil() case Cons(e,tail) if e > i => Cons(e,doSomething(tail,i)) case Cons(e,tail) => doSomething(tail,i) } }
...
-
1 2 3 4 5 6 7 8
object Main{ def doSomething(l : MyList, i : Int):MyList = { l match { case Nil() => Nil() case Cons(e,tail) if e > i => Cons(e,doSomething(tail,i)) case Cons(e,tail) => doSomething(tail,i) } }
...
-
1 2 3 4 5 6 7 8
object Main{ def doSomething(l : MyList, i : Int):MyList = { l match { case Nil() => Nil() case Cons(e,tail) if e > i => Cons(e,doSomething(tail,i)) case Cons(e,tail) => doSomething(tail,i) } }
...
-
1 2 3 4 5 6 7 8 9
object Main{ def doit() : Boolean = { println("Hey!") true } def main(args: Array[String]) { val a = false val b = !doit()
...
-
1 2 3 4 5 6 7 8 9
object Main{ def doit() : Boolean = { println("Hey!") true } def main() = { val a = false val b = !doit()
...
-
1 2 3 4 5 6 7 8 9
object Main{ def doit() : Boolean = { println("Hey!") true } def main = { val a = false val b = !doit()
...
-
1 2 3 4 5 6
object Main{ def doit() : Boolean = { println("Hey!") true } }
-
1 2 3 4
def doit() : Boolean = { println("Hey!") true }
-
1 2 3 4 5 6 7 8 9
object Main{ abstract sealed class Node[A]{ val freq: Int } case class Leaf[A](element: A, freq: Int) extends Node[A] case class Branch[A](left: Node[A], right: Node[A]) extends Node[A]{ val freq = left.freq + right.freq }
...
-
1 2
def method_missing *args;args.join " ";end puts a b c


