Sha256: c14c376bf5a23499f7c4894e33db649aed322cc1fc799cefdc07808935926bf1
Contents?: true
Size: 846 Bytes
Versions: 1
Compression:
Stored size: 846 Bytes
Contents
1 1.1 'a' "word" 1+1 1.1+1 1+1.1 1/2 1.0/2 1/2.0 f = [x| x] f(10) f = [x|x+1] f(10) f = [x, y, z| x+y-z] f(10,9,8) f = [1|1]; [2|1]; [n|f(n-1)+f(n-2)] f(10) f = [1|1] f = [2|1] f = [n|f(n-1)+f(n-2)] f(10) f = [1, x| x+1] f(1,10) f = [x, {obj: y}| x+y] f(10, {obj: 15}) f = [1, {obj: {obj2: x}}| x] f(1, {obj: {obj2: "dog"}}) f = [1, {obj: {obj2: x}}| x->concat("s")] f(1, {obj: {obj2: "dog"}}) 'a'->ord() {obj: x} -> next = [x+1] x = {obj: 15} x->next() begin(x=1, y=2, x+y) x = '(1,2,3,4) x->head() x = '(1,2,3,4) x->tail()->head() x = '(1,2,3,4) x->concat(10)->head() x = '(1,2,3,4) x->concat(10)->tail()->head() sum = [{empty}| 0]; [x| x->head() + sum(x->tail())] x = '(1,2,3,4) sum(x) if(2>=2, 1, 2) if(2<2, 1, 2) {a: {empty}, x} = {a: '(), 1} x {lambda: f, fs} -> one = [1] print->one() {lambda: f, fs} -> add_one = [x|1+x] print->add_one(3)
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
p-lang-0.3.1 | test/test_vm |