rosetta-code.bulls-and-cows: digit> is better.
parent
2b0e0934a6
commit
fa80248919
|
@ -49,7 +49,7 @@ TUPLE: bull ;
|
|||
: narr>nhash ( narr -- nhash ) { 1 2 3 4 } swap zip ;
|
||||
|
||||
: num>hash ( n -- hash )
|
||||
[ 1string string>number ] { } map-as narr>nhash ;
|
||||
[ digit> ] { } map-as narr>nhash ;
|
||||
|
||||
:: cow-or-bull ( n g -- arr )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue