2 ms·
Is there any reason for using a case instead of start env [] = env start env (line:lines) | length line > 4 && take 3 line == "+++" =
by masklinn 12y ago
Is there any reason for using a case instead of
start env [] = env
start env (line:lines)
| length line > 4 && take 3 line == "+++" =
modified (header env line) 0 lines
| otherwise =
start env lines
?
or even
start env [] = env
start env (line@('+':'+':'+':_:_):lines) =
modified (header env line) 0 lines
start env (_:lines) =
start env lines
?
- tel 12y agoThe first one is basically identical. The second one I probably wouldn't do. In both cases it just comes down to style though.