We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ad47f74 commit dd836b5Copy full SHA for dd836b5
src/1-digit/2-Two.js
@@ -1,5 +1,5 @@
1
import assert from 'assert';
2
-import {node2, node3} from '../2-node/index.js';
+import {Node2, node2, node3} from '../2-node/index.js';
3
import {Split} from '../0-core/index.js';
4
import {Digit, One, Three} from './index.js';
5
@@ -40,10 +40,8 @@ Two.prototype.cons = function (value) {
40
return new Three(value, this.a, this.b);
41
};
42
43
-Two.prototype.node = function (_M) {
44
- throw new Error(
45
- 'Two should never be converted to Node2 with current implementation',
46
- );
+Two.prototype.node = function (M) {
+ return new Node2(this.measure(M), this.a, this.b);
47
48
49
/**
0 commit comments