Usage of protocols as array types and function parameters in swift Usage of protocols as array types and function parameters in swift ios ios