[Top]
Array
|
Method Array.arrayify()
- Method
arrayify
array arrayify(void|array|mixed x)
- Description
Make an array of the argument, if it isn't already. A zero_type
argument gives the empty array. This is useful when something is
either an array or a basic datatype, for instance in headers from
the MIME module or Protocols.HTTP.Server.
- Parameter x
Result depends of the argument type:
- arrayp(x)
arrayify(x) => x
- zero_type(x)
arrayify(x) => ({})
- otherwise
arrayify(x) => ({ x })
|