Skip to content

Commit 1c7bed6

Browse files
commit for debugging purposes
1 parent fd3ce14 commit 1c7bed6

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

src/stdlib/ns/fn/insert.es6

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,22 @@
1-
export default function reflexive(cheddar) {
1+
export default function insert(cheddar) {
22
return new cheddar.func(
33
[
44
["f", {}],
55
],
66
function(scope, input){
77
return new cheddar.func(
8-
[["array", {}]],
8+
[["array", {
9+
Type: cheddar.array
10+
}]],
911
function(s, k){
1012
let arr = k("array");
1113
let f = input("f");
1214

1315
if(arr.length === 1)
1416
return arr;
1517

18+
// console.log("DEBUG:",arr);
19+
1620
return arr.value.reduce((prev, cur) => f.exec([prev, cur], null));
1721
}
1822
)

src/stdlib/ns/fn/prefix.es6

+3-4
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@ export default function prefix(cheddar) {
77
function(s, input){
88
let f = k("f");
99
return cheddar.init(cheddar.array, ...input("array").value.map(
10-
(e, i, a) => f.exec(
11-
cheddar.init(cheddar.array, ...a.slice(0, i + 1)),
12-
null
13-
)
10+
(e, i, a) => f.exec([
11+
cheddar.init(cheddar.array, ...a.slice(0, i + 1))
12+
], null)
1413
));
1514
}
1615
);

0 commit comments

Comments
 (0)