I’m curious as to whether someone in the Stan community (or the Stan developers themselves) has worked on a function to compute the number of unique elements in a vector (or other such data structure) that is equivalent to R’s version of unique().

```
rstan::lookup(unique)
```

reveals “no matching Stan functions”

If not, I think it should be fairly straightforward to include some code in the functions block to accomplish this task.