Pipes
This commit is contained in:
@@ -16,3 +16,9 @@ describe('cnst', () => {
|
||||
expect($$(cnst(__('first'))(undef))).toBe('first');
|
||||
});
|
||||
});
|
||||
|
||||
describe('pipe', () => {
|
||||
it.failing('applies both functions in order', () => {
|
||||
expect('Not implemented').toBe('Implemented');
|
||||
});
|
||||
});
|
||||
|
||||
+11
-1
@@ -4,7 +4,7 @@ import { toNOrd as $o, NOrd } from '../src/ord';
|
||||
import { toBoolean as $b, iif } from '../src/bool';
|
||||
import { toNumber as $n, toNumber as $nn, Num, Succ, Zero, fromNumber as _n, fromNumber as _nn, cmp as cmpn, eq as eqn, even, gt as ngt, show as nshow, odd, succ, sum } from '../src/num';
|
||||
import { toChar as $c } from '../src/char';
|
||||
import { toArray as $a, Cons, List, Nil, fromArray as _a, all, any, append, cmp, concat, cons, eq, filter, foldl, foldlz, foldr, foldrz, ge, get, gt, head, intersperse, iterate, le, len, lt, map, nul, set, show, snoc, tail, update } from '../src/list';
|
||||
import { toArray as $a, Cons, List, Nil, fromArray as _a, all, any, append, cmp, concat, cons, eq, filter, foldl, foldlz, foldr, foldrz, ge, get, gt, head, intersperse, iterate, le, len, lt, map, nul, set, show, singleton, snoc, tail, update } from '../src/list';
|
||||
import { toString as $s } from '../src/string';
|
||||
|
||||
describe('List', () => {
|
||||
@@ -114,6 +114,16 @@ describe('List', () => {
|
||||
it('handles infinite lists', () => {
|
||||
expect($b(ngt(len(infinite))(Zero))).toEqual(true);
|
||||
});
|
||||
|
||||
it('ignores items', () => {
|
||||
expect($n(len(cons(undef)(cons(undef)(Nil))))).toEqual(2);
|
||||
});
|
||||
});
|
||||
|
||||
describe('singleton', () => {
|
||||
it('singleton 0 is [0]', () => {
|
||||
expect($na(singleton(_n(0)))).toEqual([0]);
|
||||
});
|
||||
});
|
||||
|
||||
describe('append', () => {
|
||||
|
||||
Reference in New Issue
Block a user