rosetta-code.bulls-and-cows: digit> is better.

db4
John Benediktsson 2012-08-13 18:17:03 -07:00
parent 2b0e0934a6
commit fa80248919
1 changed files with 1 additions and 1 deletions

View File

@ -49,7 +49,7 @@ TUPLE: bull ;
: narr>nhash ( narr -- nhash ) { 1 2 3 4 } swap zip ; : narr>nhash ( narr -- nhash ) { 1 2 3 4 } swap zip ;
: num>hash ( n -- hash ) : num>hash ( n -- hash )
[ 1string string>number ] { } map-as narr>nhash ; [ digit> ] { } map-as narr>nhash ;
:: cow-or-bull ( n g -- arr ) :: cow-or-bull ( n g -- arr )
{ {