foxx3r / binary_tree_haskell

I created a binary tree (a data structure) using haskell language programming

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

binary_tree_haskell

I created a binary tree (a data structure) using haskell language programming

To test that script, run the haskell interpreter with:

$ ghci

Then, on prelude, go to the directory and load the source file:

Prelude> :cd <directory>

Prelude> :l binary_tree.hs

And then, use those functions. List of functions:

  • in_order: BinTree -> [Int]

You can implement your own binary tree, using the pre-defined data BinTree. Here is your implementation:

data BinTree = Null | Node Int BinTree BinTree

About

I created a binary tree (a data structure) using haskell language programming

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Haskell 100.0%