anchor.diff:  prepend(Items, Value) when ?AVRO_IS_ARRAY_VALUE(Value) ->
     new(?AVRO_VALUE_TYPE(Value), Items ++ ?AVRO_VALUE_DATA(Value)).
   
  -append(Items, Value) when ?AVRO_IS_ARRAY_VALUE(Value) ->
  -  new(?AVRO_VALUE_TYPE(Value), ?AVRO_VALUE_DATA(Value) ++ Items).
  -
  -
   %% Only other Avro array type or erlang list can be casted to arrays
   -spec cast(avro_type(), term()) -> {ok, avro_value()} | false.
   
  
positive.code: -export([cast/2]).
  
  -export([prepend/2]).
  -export([append/2]).
  
  -include_lib("erlavro/include/erlavro.hrl").
  
  
negative.code:   do_cast(Type, ?AVRO_VALUE_DATA(Array));
  do_cast(Type, Items) when is_list(Items) ->
    #avro_array_type{type = ItemType} = Type,
    case cast_items(ItemType, Items, []) of
      false -> false;
      CastedItems -> {ok, ?AVRO_VALUE(Type, CastedItems)}
    end.
  
  cast_items(_TargetType, [], Acc) ->
    lists:reverse(Acc);
  cast_items(TargetType, [Item|H], Acc) ->
    case avro:cast(TargetType, Item) of
      {ok, Value} -> cast_items(TargetType, H, [Value|Acc]);
      false       -> false
    end.
  
  %%%===================================================================
  