Created
September 16, 2012 10:20
-
-
Save nrolland/3731883 to your computer and use it in GitHub Desktop.
zipper test
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
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