Commit before generalising picture transformation to alternative
This commit is contained in:
@@ -4,6 +4,8 @@ module Picture.Data
|
||||
where
|
||||
import Geometry.Data
|
||||
|
||||
import Data.Foldable
|
||||
|
||||
--import Data.Monoid
|
||||
--import Data.Traversable
|
||||
--import qualified Data.Foldable as F
|
||||
@@ -55,6 +57,7 @@ instance Foldable LTree where
|
||||
instance Functor LTree where
|
||||
fmap f (LBranches ts) = LBranches $ fmap (fmap f) ts
|
||||
fmap f (LLeaf x) = LLeaf (f x)
|
||||
{-# INLINE fmap #-}
|
||||
|
||||
data RTree a b
|
||||
= RBranches a [RTree a b]
|
||||
|
||||
Reference in New Issue
Block a user