Commit 88cba6ba authored by pm3g19's avatar pm3g19
Browse files

Corrected problem definitions

parent 32db377e
.in
A:3
P: 4,
Q: 4
.out
filter (\r -> r[2] == r[3]); # data the the function works on (e.g. input set this time) goes in [], extra info (e.g. predicate in this case) goes in ()
map(\r -> r[3,1]); # can also be map[\_](\r ...), where \_ is output of last operation.
P x Q;
filter(\r -> r[4] == r[5]);
let func f(x,y) = if (empty(x)) then y else x;
map(\r -> [r[1], f(r[2], r[6]), f(r[3], r[7]), f(r[4], r[8]));
\ No newline at end of file
.in
P: 4,
Q: 4
A:2
.out
P x Q;
filter(\r -> r[4] == r[5]);
let func f(x,y) = if (empty(x)) then y else x;
map(\r -> [r[1], f(r[2], r[6]), f(r[3], r[7]), f(r[4], r[8]));
\ No newline at end of file
filter (\(r) -> notEmpty(r[2]))
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment