Skip to content

Commit

Permalink
Add a missing fromJust
Browse files Browse the repository at this point in the history
  • Loading branch information
sol committed Jun 10, 2012
1 parent a172653 commit 5f23251
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions README.markdown
Expand Up @@ -80,18 +80,18 @@ then_0 input = case match input "the result should be \"([^\"]*)\"" of
_ -> Nothing _ -> Nothing
``` ```


Constructing the test term from that is simple: In theory, constructing the test term from that is easy:


```haskell ```haskell
import Data.Maybe
import Control.Applicative import Control.Applicative


(<+>) = flip (<*>) test = fromJust $

then_0 "the result should be \"y\""
test = then_0 "the result should be \"y\"" <*> when_2 "I pretty-print it"
<*> when_2 "I pretty-print it" <*> when_1 "I reduce it"
<*> when_1 "I reduce it" <*> when_0 "I parse it"
<*> when_0 "I parse it" <*> given_0 "a lambda term \"(λx.x)y\""
<*> given_0 "a lambda term \"(λx.x)y\""
``` ```


### What to do if multiple things are given? ### What to do if multiple things are given?
Expand Down

0 comments on commit 5f23251

Please sign in to comment.