Skip to content

Commit 66b5222

Browse files
authored
README Recursion (#216)
1 parent 65ef2ec commit 66b5222

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,7 @@ In some cases like this:
114114

115115
```purescript
116116
aye :: Parser String Char
117-
aye = do
118-
char 'a'
119-
aye
117+
aye = char 'a' *> aye
120118
```
121119

122120
we might get a compile-time *CycleInDeclaration* error which looks like this:
@@ -139,9 +137,7 @@ this is to stick a
139137
in front of the parser to break the cycle.
140138
```purescript
141139
aye :: Parser String Char
142-
aye = defer \_ -> do
143-
char 'a'
144-
aye
140+
aye = defer \_ -> char 'a' *> aye
145141
```
146142

147143

0 commit comments

Comments
 (0)