Skip to content

Commit

Permalink
Add functor instance for products
Browse files Browse the repository at this point in the history
  • Loading branch information
benl23x5 committed Apr 10, 2016
1 parent 03da71a commit bd7f216
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions repa-scalar/Data/Repa/Scalar/Product.hs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ data a :*: b

infixr :*:

instance Functor ((:*:) a) where
fmap f ((:*:) x y) = (:*:) x (f y)


-- | Sequences of products that form a valid list,
-- using () for the nil value.
Expand Down

0 comments on commit bd7f216

Please sign in to comment.