Skip to content

Instantly share code, notes, and snippets.

@nrolland
Created September 16, 2012 10:20
Show Gist options
  • Save nrolland/3731883 to your computer and use it in GitHub Desktop.
Save nrolland/3731883 to your computer and use it in GitHub Desktop.
zipper test
module test =
open Zipper
let t = Branch("a", Branch("b", Leaf, Branch("c", Leaf, Leaf)), Leaf)
let focus1 = t |> fromTree |> move [Left;Right]
let same1 = t |> fromTree |> move [Left;Right;Right;Up;Up;Up]
let same2 = t |> fromTree |> move [Left;Right;Right] |> Zipper.top
let xx = focus1 |> top
let newz = {(move [Left;Right;Right] xx) with focus = t} |> top
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment