PageRenderTime 14ms CodeModel.GetById 12ms RepoModel.GetById 0ms app.codeStats 0ms

/samples/closure/closure1.ooc

http://github.com/nddrylliog/oc
Unknown | 9 lines | 6 code | 3 blank | 0 comment | 0 complexity | a8616db769d80a93e6a489c73a0304a3 MD5 | raw file
  1. printf: extern func
  2. gen: func -> Func -> int {
  3. return func -> int { return 42 }
  4. }
  5. f1 := gen()
  6. printf("%d\n", f1())