X-Git-Url: https://gitweb.factorcode.org/gitweb.cgi?p=factor.git;a=blobdiff_plain;f=extra%2Fpath-finding%2Fpath-finding-tests.factor;h=e5466d0326aa25c9c4fa055aed0894334b85783c;hp=3bdf77ca284947d1ba4c8bd1fdbc9b4f81b705d3;hb=6d4293b5822d769619f66e46e64b704ddfe41b43;hpb=b7bb69b178712e9d135362ebd6efa69c9b8371ba diff --git a/extra/path-finding/path-finding-tests.factor b/extra/path-finding/path-finding-tests.factor index 3bdf77ca28..e5466d0326 100644 --- a/extra/path-finding/path-finding-tests.factor +++ b/extra/path-finding/path-finding-tests.factor @@ -30,7 +30,7 @@ TUPLE: maze < astar ; 8 X X X X X X X X X X" split-lines ] nth nth CHAR: X = not ; -M: maze neighbours +M: maze neighbors drop first2 { [ 1 + 2array ] [ 1 - 2array ] [ [ 1 + ] dip 2array ] [ [ 1 - ] dip 2array ] } 2cleave @@ -99,7 +99,7 @@ M: maze cost MEMO: routes ( -- hash ) $[ { "ABD" "BC" "C" "DCE" "ECF" } [ unclip swap 2array ] map >hashtable ] ; -: n ( pos -- neighbours ) +: n ( pos -- neighbors ) routes at ; : c ( from to -- cost )