now supports functions over sets