File: Fringe.lhs

package info (click to toggle)
haskell98-tutorial 200006-2-3
  • links: PTS
  • area: main
  • in suites: bullseye
  • size: 972 kB
  • sloc: haskell: 2,125; makefile: 68; sh: 9
file content (7 lines) | stat: -rw-r--r-- 171 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7

> module Fringe where
> import Tree ( Tree(..))

> fringe :: Tree a -> [a]   -- A different definition of fringe
> fringe (Leaf x) = [x]
> fringe (Branch x y) = fringe x