Skip to content

Commit

Permalink
FoldDir.hs wip
Browse files Browse the repository at this point in the history
  • Loading branch information
tianyicui committed Nov 28, 2010
1 parent 19bf85b commit ab2105a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ch09/ControlledVisit.hs
@@ -1,5 +1,7 @@
{-# LANGUAGE ScopedTypeVariables, NoMonomorphismRestriction #-}

module ControlledVisit where

import Data.List(sortBy)
import Data.Ord(comparing)
import Control.Monad (forM, liftM)
Expand Down
10 changes: 10 additions & 0 deletions ch09/FoldDir.hs
@@ -0,0 +1,10 @@
module FoldDir where

import ControlledVisit

data Iterate seed = Done { unwrap :: seed }
| Skip { unwrap :: seed }
| Continue { unwrap :: seed }
deriving (Show)

type Iterator seed = seed -> Info -> Iterate seed

0 comments on commit ab2105a

Please sign in to comment.