Sha256: 5977602afb27cec49c1c11fd6b53d43daebbdd23d1724b1da3df58709f98d0bc

Contents?: true

Size: 1.23 KB

Versions: 270

Compression:

Stored size: 1.23 KB

Contents

module Zipper
 ( BinTree(BT)
 , fromTree
 , left
 , right
 , setLeft
 , setRight
 , setValue
 , toTree
 , up
 , value
 ) where

data BinTree a = BT { btValue :: a
                    , btLeft  :: Maybe (BinTree a)
                    , btRight :: Maybe (BinTree a)
                    } deriving (Eq, Show)

data Zipper a = Dummy deriving (Eq, Show)

fromTree :: BinTree a -> Zipper a
fromTree tree = error "You need to implement this function."

toTree :: Zipper a -> BinTree a
toTree zipper = error "You need to implement this function."

value :: Zipper a -> a
value zipper = error "You need to implement this function."

left :: Zipper a -> Maybe (Zipper a)
left zipper = error "You need to implement this function."

right :: Zipper a -> Maybe (Zipper a)
right zipper = error "You need to implement this function."

up :: Zipper a -> Maybe (Zipper a)
up zipper = error "You need to implement this function."

setValue :: a -> Zipper a -> Zipper a
setValue x zipper = error "You need to implement this function."

setLeft :: Maybe (BinTree a) -> Zipper a -> Zipper a
setLeft tree zipper = error "You need to implement this function."

setRight :: Maybe (BinTree a) -> Zipper a -> Zipper a
setRight tree zipper = error "You need to implement this function."

Version data entries

270 entries across 270 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/haskell/exercises/zipper/src/Zipper.hs
trackler-2.2.1.179 tracks/haskell/exercises/zipper/src/Zipper.hs
trackler-2.2.1.178 tracks/haskell/exercises/zipper/src/Zipper.hs
trackler-2.2.1.177 tracks/haskell/exercises/zipper/src/Zipper.hs
trackler-2.2.1.176 tracks/haskell/exercises/zipper/src/Zipper.hs
trackler-2.2.1.175 tracks/haskell/exercises/zipper/src/Zipper.hs
trackler-2.2.1.174 tracks/haskell/exercises/zipper/src/Zipper.hs
trackler-2.2.1.173 tracks/haskell/exercises/zipper/src/Zipper.hs
trackler-2.2.1.172 tracks/haskell/exercises/zipper/src/Zipper.hs
trackler-2.2.1.171 tracks/haskell/exercises/zipper/src/Zipper.hs
trackler-2.2.1.170 tracks/haskell/exercises/zipper/src/Zipper.hs
trackler-2.2.1.169 tracks/haskell/exercises/zipper/src/Zipper.hs
trackler-2.2.1.167 tracks/haskell/exercises/zipper/src/Zipper.hs
trackler-2.2.1.166 tracks/haskell/exercises/zipper/src/Zipper.hs
trackler-2.2.1.165 tracks/haskell/exercises/zipper/src/Zipper.hs
trackler-2.2.1.164 tracks/haskell/exercises/zipper/src/Zipper.hs
trackler-2.2.1.163 tracks/haskell/exercises/zipper/src/Zipper.hs
trackler-2.2.1.162 tracks/haskell/exercises/zipper/src/Zipper.hs
trackler-2.2.1.161 tracks/haskell/exercises/zipper/src/Zipper.hs
trackler-2.2.1.160 tracks/haskell/exercises/zipper/src/Zipper.hs