FSharpx.Collections


BinaryTreeZipper Module

TreeZipper original implementation taken from http://blog.xquant.net/?p=156

Types

Type Description

TreeZipperDirection

Functions and values

Function or value Description

BinaryTreeZipper.branch x

Full Usage: BinaryTreeZipper.branch x

Parameters:
    x : 'a

Returns: BinaryTree<'a>

Creates a new branch with the label x and two leaves as subbranches

x : 'a
Returns: BinaryTree<'a>

BinaryTreeZipper.getMove direction

Full Usage: BinaryTreeZipper.getMove direction

Parameters:
Returns: BinaryTreeZipper<'a> -> BinaryTreeZipper<'a>
direction : TreeZipperDirection
Returns: BinaryTreeZipper<'a> -> BinaryTreeZipper<'a>

BinaryTreeZipper.left z

Full Usage: BinaryTreeZipper.left z

Parameters:
Returns: BinaryTreeZipper<'a>

Moves the zipper to the left

z : BinaryTreeZipper<'a>
Returns: BinaryTreeZipper<'a>

BinaryTreeZipper.move directions z

Full Usage: BinaryTreeZipper.move directions z

Parameters:
Returns: BinaryTreeZipper<'T>

Moves the zipper in the directions of the given list

directions : seq<TreeZipperDirection>
z : BinaryTreeZipper<'T>
Returns: BinaryTreeZipper<'T>

BinaryTreeZipper.right z

Full Usage: BinaryTreeZipper.right z

Parameters:
Returns: BinaryTreeZipper<'a>

Moves the zipper to the right

z : BinaryTreeZipper<'a>
Returns: BinaryTreeZipper<'a>

BinaryTreeZipper.setFocus newFocus zipper

Full Usage: BinaryTreeZipper.setFocus newFocus zipper

Parameters:
Returns: BinaryTreeZipper<'a>

Modifies the current focus inside the zipper

newFocus : BinaryTree<'a>
zipper : BinaryTreeZipper<'a>
Returns: BinaryTreeZipper<'a>

BinaryTreeZipper.top z

Full Usage: BinaryTreeZipper.top z

Parameters:
Returns: BinaryTreeZipper<'a>

Moves the zipper to the top

z : BinaryTreeZipper<'a>
Returns: BinaryTreeZipper<'a>

BinaryTreeZipper.up z

Full Usage: BinaryTreeZipper.up z

Parameters:
Returns: BinaryTreeZipper<'a>

Moves the zipper one level up

z : BinaryTreeZipper<'a>
Returns: BinaryTreeZipper<'a>

BinaryTreeZipper.zipper t

Full Usage: BinaryTreeZipper.zipper t

Parameters:
Returns: BinaryTreeZipper<'a>

Creates a zipper from a tree

t : BinaryTree<'a>
Returns: BinaryTreeZipper<'a>