# values_cut_under proc

Source: https://ref.dm-lang.org/proc/values_cut_under
Added in BYOND 516.

### Format
> `values_cut_under(Alist, Min, inclusive=0)`

### Returns
> Number of items removed

### Args
- `Alist`: An [associative list](https://ref.dm-lang.org/list/associations.md) or [alist](https://ref.dm-lang.org/proc/alist.md)
- `Min`: The maximum number allowed
- `inclusive`: Also cut items whose value equals Min


Removes all items from the list whose associated values are less than Min, not numbers, or [NaN](https://ref.dm-lang.org/proc/isnan.md).

If the optional `inclusive` argument is true, items with associated values equal to Min are removed also.

```dm /values_cut_under/
var/list/stuff = list("a"=1, "b"=2, "c"=-4)
values_cut_under(stuff, 0)
for(var/k,v in stuff)
    usr << "[k] = [v]"
// prints:
// a = 1
// b = 2
```

This is a convenience proc for games trying to eke out high performance.

If Alist is not an associative list, nothing happens.

### See also
- [list associations](https://ref.dm-lang.org/list/associations.md)
- [values_cut_over proc](https://ref.dm-lang.org/proc/values_cut_over.md)
