Skip to content

Commit 6beb557

Browse files
authored
Fix rasplib functions average and mark_first_instance
Fix rasplib functions average and mark_first_instance
2 parents 43fd989 + 6dd1016 commit 6beb557

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

RASP_support/rasplib.rasp

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def min(a,b) {
3434
}
3535

3636
def average(a) {
37-
return aggregate(full_s,s);
37+
return aggregate(full_s,a);
3838
}
3939

4040
def load_from_location(seq,location) {
@@ -58,7 +58,7 @@ def mark_last_instance(seq,val) {
5858
def mark_first_instance(seq,val) {
5959
has_val = seq == val;
6060
find_val = select(seq,val,==);
61-
find_earlier = select(indices,indices,>);
61+
find_earlier = select(indices,indices,<);
6262
find_earlier_val = find_val and find_earlier;
6363
has_earlier_val = has_focus(find_earlier_val);
6464
return has_val and not has_earlier_val;

0 commit comments

Comments
 (0)