I facing difficulties implementing prim\'s algorithm, my logic is quite wrong, this is what I got so far:
import Data.Array import Data.Function (on) import D