diff --git a/src/org/rascalmpl/library/List.rsc b/src/org/rascalmpl/library/List.rsc index 6e0b0e61af2..6987afbba93 100644 --- a/src/org/rascalmpl/library/List.rsc +++ b/src/org/rascalmpl/library/List.rsc @@ -96,9 +96,7 @@ dup([3, 1, 5, 3, 1, 7, 1, 2]); list[&T] dup(list[&T] lst) = ([] | (ix in it) ? it : it + [ix] | &T ix <- lst); -@deprecated{ -Use a list index instead -} +@deprecated Use a list index instead} @javaClass{org.rascalmpl.library.Prelude} java &T elementAt(list[&T] lst, int index); @@ -481,7 +479,8 @@ push("eagle", ["zebra", "elephant", "snake", "owl"]); list[&T] push(&T elem, list[&T] lst) = [elem] + lst; -@synopsis{Apply a function to successive elements of list and combine the results (__deprecated__).} +@synopsis{Apply a function to successive elements of list and combine the results.} +@deprecated{This function is deprecated. Use a reducer expression instead, like `(init | f(it, e) | e <- lst)`.} @description{ Apply the function `fn` to successive elements of list `lst` starting with `unit`. } @@ -492,14 +491,6 @@ int add(int x, int y) { return x + y; } reducer([10, 20, 30, 40], add, 0); ``` } -@benefits{ - -} -@pitfalls{ -:::warning -This function is *deprecated*, use a reducer expression instead. E.g. `(init | f(it, e) | e <- lst)`. -::: -} &T reducer(list[&T] lst, &T (&T, &T) fn, &T unit) { &T result = unit;