type Maze = unit
type Point = unit
type VisitedPoint = Point
type NextPoint = Point
let deadEnd = failwith "hole"
let atEnd = failwith "hole"
let startingPoint = failwith "hole"
let takeRandomStepFrom = failwith "hole"
let tryRandomDirection (maze: Maze) (currentPosition: Point): (VisitedPoint*NextPoint) option =
match (deadEnd currentPosition maze, atEnd currentPosition maze) with
| _, true -> None
| true, _ -> Some (currentPosition, startingPoint)
| _ -> Some (currentPosition, takeRandomStepFrom currentPosition maze)
let someMaze = failwith "hole"
let howWeGotThere = Seq.unfold (tryRandomDirection someMaze) startingPoint