к
Size: a a a
OS
DB
OS
type YX = (Int, Int)
neighbourMoves :: [YX]
neighbourMoves =
[ (-1, -1), (-1, 0), (-1, 1)
, (0, -1), (0, 1)
, (1, -1), (1, 0), (1, 1)]
OS
(p >= 0) && (p < w * h) && (abs ((src `mod` w) - (p `mod` w)) <= 1) = Just p
OS
OS
reachableVs =
filter (`notElem` path) $ filter (isPossible g path) $
getNeighbours g $ head path
import Data.Function ((&))
reachableVs =
head path
& getNeighbours g
& filter (isPossible g path)
& filter (`notElem` path)
A
import qualified Network.HTTP.Client as Client
fn = Client.
JS
A
JS
A
MK