Advertisement
Guest User

Untitled

a guest
May 13th, 2014
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
F# 0.69 KB | None | 0 0
  1. // im trying to take a list of 'a[,] and turn it into ('a[,]*b*c) list, but it says im returning type unit
  2.  
  3. let adjacentStates = List.map (fun x ->
  4.                                             let containsX list = List.exists (fun (b,g,f) -> b = x) list
  5.                                             if (not (List.exists (fun elem -> elem = x) CS)) && (not (containsX removedCurrent)) then
  6.                                               let newGS = GS + 1
  7.                                               let newFS = newGS + totalManhattanDistance x goal
  8.                                               (x, newGS, newFS)(* here is where it says expecting type ('a*'b*c) but got type unit*)) adjacentBoards
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement