init commit again

This commit is contained in:
Peter
2023-11-01 09:29:33 +01:00
parent 448147e7da
commit d6c745207b
250 changed files with 15552 additions and 1 deletions

View File

@@ -0,0 +1,16 @@
general {
funcon-term:
initialise-giving
initialise-binding
apply(
sequential(print 1, function abstraction print given),
sequential(print 2 , 3))
;
}
tests {
result-term: null-value;
standard-out: [1, 2, 3];
//Also:
// standard-out: [2, 1, 3];
}

View File

@@ -0,0 +1,20 @@
general {
funcon-term:
initialise-giving
initialise-binding
scope(
bind-value("f",
function abstraction
sequential(print given, integer-add(1,given))),
print apply(
compose(
bound-value"f",
function abstraction sequential(print 1, 2)),
99))
;
}
tests {
result-term: null-value;
standard-out: [1, 2, 3];
}

View File

@@ -0,0 +1,17 @@
general {
funcon-term:
initialise-giving
initialise-binding
scope(
bind-value("f",
function abstraction print given),
apply(
apply(curry(bound-value"f"), 1),
2))
;
}
tests {
result-term: null-value;
standard-out: [tuple(1,2)];
}

View File

@@ -0,0 +1,27 @@
general {
funcon-term:
initialise-giving
initialise-binding
scope(
bind-value("x",99),
give(
99,
give(
function abstraction(
sequential(
print given,
print bound-value"x")),
scope(
bind-value("x",4),
apply(
sequential(print 1, given),
sequential(print 2, 3))))))
;
}
tests {
result-term: null-value;
standard-out: [1, 2, 3, 4];
//Also:
// standard-out: [2, 1, 3, 4];
}

View File

@@ -0,0 +1,27 @@
general {
funcon-term:
initialise-giving
initialise-binding
scope(
bind-value("x",4),
give(
99,
give(
function closure(
sequential(
print given,
print bound-value"x")),
scope(
bind-value("x",99),
apply(
sequential(print 1, given),
sequential(print 2, 3))))))
;
}
tests {
result-term: null-value;
standard-out: [1, 2, 3, 4];
//Also:
// standard-out: [2, 1, 3, 4];
}

View File

@@ -0,0 +1,17 @@
general {
funcon-term:
initialise-giving
initialise-binding
scope(
bind-value("f",
function abstraction print given),
apply(
partial-apply(bound-value"f", 1),
2))
;
}
tests {
result-term: null-value;
standard-out: [tuple(1,2)];
}

View File

@@ -0,0 +1,17 @@
general {
funcon-term:
initialise-giving
initialise-binding
force(
supply(
sequential(print 1, function abstraction print given),
sequential(print 2 , 3)))
;
}
tests {
result-term: null-value;
standard-out: [1, 2, 3];
//Also:
// standard-out: [2, 1, 3];
}

View File

@@ -0,0 +1,17 @@
general {
funcon-term:
initialise-giving
initialise-binding
scope(
bind-value("f",
uncurry function abstraction
sequential(print given,
function abstraction print given)),
apply(bound-value"f", tuple(1,2)))
;
}
tests {
result-term: null-value;
standard-out: [1, 2];
}