Filter
- Parameters
-
func code
- comment
Returns a new filterfunc that has the result of evaluating func(). func will receive no arguments and must return a boolean: true/false.
- note
(Old description)Do not destroy filterfuncs created with
Filter
because this function does not create a new handle (Filter(function foo) == Filter(function foo)
). In the best case it does nothing but in the worst case it affects some internals.- note
Lua, 1.32.10:
filterfunc
extends fromboolexpr
->agent
and must be explicitly destroyed withDestroyBoolExpr
/DestroyFilter
to prevent leaks. However, most functions from blizzard.j destroy passed boolexpr automatically.- pure
- This function is pure. For the same values passed to it, it will always return the same value.
- return type
filterfunc
- Source code
native Filter takes code func returns filterfunc
- Source
- boolexpr.j
- wc3modding.com
- Filter