anchor.diff:  	from_trits(Trits0, <<>>).
   
   from_trits([T0, T1, T2|T], Acc) ->
  -	Index =
  -		case T0 * 9 + T1 * 3 + T2 of
  -		I when I < 0 ->
  -			27 - abs(I);
  -		I ->
  -			I
  -		end,
  -	X = binary:at(?CHARSET, Index),
  +	X = tryte(T0 * 9 + T1 * 3 + T2),
   	from_trits(T, <<X, Acc/binary>>);
   from_trits([], Acc) ->
   	Acc.
   
   
  -pad(Trits) ->
  -	case length(Trits) rem 3 of
  -	2 ->
  -		[0|Trits];
  -	1 ->
  -		[0, 0|Trits];
  -	0 ->
  -		Trits
  -	end.
  -
  -
   from_trytes(Trytes) ->
   	from_trytes(Trytes, <<>>).
   
  -from_trytes([H|T], Acc) when H >= 0 ->
  -	X = binary:at(?CHARSET, H),
  -	from_trytes(T, <<Acc/binary, X>>);
  -from_trytes([H|T], Acc) when H < 0 ->
  -	X = binary:at(?CHARSET, H + 27),
  -	from_trytes(T, <<Acc/binary, X>>);
  +from_trytes([H|T], Acc) ->
  +	X = tryte(H),
  +	from_trytes(T, <<X, Acc/binary>>);
   from_trytes([], Acc) ->
   	Acc.
   
  
positive.code: 
  -module(trinary).
  
  -compile(export_all).
  
  -define(CHARSET, <<"9ABCDEFGHIJKLMNOPQRSTUVWXYZ">>).
  
  
negative.code: 	Acc.
  
  
  to_text(Trytes) ->
  	to_text(Trytes, <<>>).
  
  