1.3.6. List::fold_right

Start felix section to test/stdlib/slrt-1.02.06-0.flx[1 /1 ]
     1: #line 381 "./lpsrc/flx_stdlib_regress.pak"
     2: //Check lists
     3: #import <flx.flxh>
     4: open List;
     5: val f = fun (x:int) (y:int) => x - y;
     6: print$ fold_right f (list[int]()) 4; endl;
     7: print$ fold_right f (list(4)) 5; endl;
     8: print$ fold_right f (list(4, 5)) 6; endl;
     9: print$ fold_right f (list(4, 5, 6)) 7; endl;
    10: print$ fold_right f (list(4, 5, 6, 7)) 8; endl;
End felix section to test/stdlib/slrt-1.02.06-0.flx[1]
Start data section to test/stdlib/slrt-1.02.06-0.expect[1 /1 ]
     1: 4
     2: -1
     3: 5
     4: -2
     5: 6
End data section to test/stdlib/slrt-1.02.06-0.expect[1]