Created
May 6, 2014 15:00
-
-
Save graninas/e93e32aa1950a6f7b040 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- file PathFind/Dijkstra.hs | |
module PathFind.Dijkstra (findPath) where | |
findPath = undefined | |
-- file PathFind/AStar.hs | |
module PathFind.AStar (findPath) where | |
findPath = undefined | |
-- file PathFind.hs | |
module PathFind (findPath, dijkstra, aStar) where | |
import qualified PathFind.Dijkstra as D | |
import qualified PathFind.AStar as A | |
data FindPathAlgorithm = Dijkstra | AStar | |
findPath Dijkstra = D.findPath | |
findPath AStar = A.findPath | |
dijkstra = Dijkstra | |
aStar = AStar | |
-- file Main.hs | |
module Main where | |
import PathFind | |
f a b c = a (findPath dijkstra b) c |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment