From: Alexander Ilin Date: Fri, 1 Sep 2023 21:44:18 +0000 (+0200) Subject: sudokus: fix compilation X-Git-Url: https://gitweb.factorcode.org/gitweb.cgi?p=factor.git;a=commitdiff_plain;h=b1693690132bced2bf266c3bf8a63eff61a9c771 sudokus: fix compilation --- diff --git a/extra/sudokus/sudokus.factor b/extra/sudokus/sudokus.factor index a45df31f1d..ca8f0ce5d6 100644 --- a/extra/sudokus/sudokus.factor +++ b/extra/sudokus/sudokus.factor @@ -1,8 +1,8 @@ -USING: accessors arrays combinators.short-circuit grouping kernel lists -lists.lazy locals math math.functions math.parser math.ranges -models.product monads random sequences sets ui ui.gadgets.controls -ui.gadgets.layout models.combinators ui.gadgets.alerts vectors fry -ui.gadgets.labels shuffle ; +USING: accessors arrays combinators.short-circuit fry grouping +kernel lists lists.lazy locals math math.functions math.parser +models.combinators models.product monads random ranges sequences +sets shuffle ui ui.gadgets.alerts ui.gadgets.controls +ui.gadgets.labels ui.gadgets.layout vectors ; IN: sudokus : row ( index -- row ) 1 + 9 / ceiling ; @@ -14,7 +14,7 @@ IN: sudokus :: solutions ( puzzle random? -- solutions ) f puzzle random? [ indices [ f ] [ random? swap nth-or-lower ] if-empty ] [ index ] if [ :> pos - 1 9 [a,b] 80 [ pos near ] filter [ puzzle nth ] map prune diff + 1 9 [a..b] 80 [ pos near ] filter [ puzzle nth ] map members diff [ 1array puzzle pos cut-slice rest surround ] map >list [ random? solutions ] bind ] [ puzzle list-monad return ] if* ;