anchor.diff:  -module(example).
  --export([valid/1, create/1, checksum/1, isNumeric/1, isMinLength/1, test_version/0]).
  +-export([valid/1, test_version/0]).
   
   
   
  
positive.code: 
  
  valid(Number) ->
    isNumeric(Number) andalso checksum(Number) rem 10 == 0 andalso length(isMinLength(Number)) > 1.
  
  
  
  create(Number) ->
    lists:flatten([Number, ($: - (checksum(Number ++ [$0]) rem 10))]).
  
  
  
  test_version() ->
      1.
  
negative.code: 
  
  
  is_numeric(Number) -> 
    case re:run(Number, "^[0-9 ]+$") of
      {match, _} -> true;
      nomatch    -> false
    end.
  
  
  
  is_min_length(Number) -> 
    length(re:replace(Number, "(^\\s+)|(\\s+$)", "", [global,{return,list}])) > 1.
  
  
  
  