lab07: impl applicative
This commit is contained in:
@@ -69,7 +69,8 @@ Define the behavior of the Functor below
|
|||||||
|
|
||||||
> instance Applicative FacetedValue where
|
> instance Applicative FacetedValue where
|
||||||
> pure = Raw
|
> pure = Raw
|
||||||
> fv1 <*> fv2 = error "Your code here"
|
> Raw f <*> fv2 = fmap f fv2
|
||||||
|
> Facet label auth unauth <*> fv2 = Facet label (auth <*> fv2) (unauth <*> fv2)
|
||||||
|
|
||||||
|
|
||||||
The code below gives an example of how this might come up. If code authorized
|
The code below gives an example of how this might come up. If code authorized
|
||||||
|
|||||||
Reference in New Issue
Block a user