Skip to content

Commit

Permalink
added proper @deprecated tag
Browse files Browse the repository at this point in the history
  • Loading branch information
jurgenvinju committed Oct 29, 2024
1 parent 3a894db commit 8b4bfaa
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/org/rascalmpl/library/Set.rsc
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ power1({1,2,3,4});
}
public set[set[&T]] power1(set[&T] st) = power(st) - {{}};

@synopsis{Apply a function to successive elements of a set and combine the results (__deprecated__).}
@synopsis{Apply a function to successive elements of a set and combine the results.}
@description{
Apply the function `fn` to successive elements of set `s` starting with `unit`.
}
Expand All @@ -229,11 +229,7 @@ int add(int x, int y) { return x + y; }
reducer({10, 20, 30, 40}, add, 0);
```
}
@pitfalls{
:::warning
This function is *deprecated*, use a reducer expression instead, such as `(init | fn(it,e) | e <- st)`.
:::
}
@deprecated{Use a reducer expression instead, such as `(init | fn(it,e) | e <- st)`.}
public &T reducer(set[&T] st, &T (&T,&T) fn, &T unit) =
(unit | fn(it,elm) | elm <- st);

Expand Down

0 comments on commit 8b4bfaa

Please sign in to comment.