public
Description: The Pekoe programming language (still in the early development/planning process). Nothing is really usable yet, though quite a few things are working.
Home | Edit | New

Home

The Pekoe programming language

The Pekoe programming language (still in the early development/planning process). Nothing is really usable yet, though quite a few things are working.

Examples

accumulator (closure):


var make_accumulator = function(n) {
  return function(i) { n = n + i; };
}

var accum1 = make_accumulator(111); // accumulator 1
var accum2 = make_accumulator(222); // accumulator 2

assert accum1(12)  == 123;
assert accum2(8)   == 230;
assert accum1(17)  == 140;
assert accum2(-30) == 200;
Last edited by ishikawa, Sun May 24 06:43:33 -0700 2009
Home | Edit | New
Versions: