replace-megaparsec icon indicating copy to clipboard operation
replace-megaparsec copied to clipboard

utility functions

Open jamesdbrock opened this issue 6 years ago • 0 comments
trafficstars

doesMatchExist = case (sepCap sep input) of
    [Left _] -> False
    otherwise -> True

Does laziness short-circuit doesMatchExist correctly?

firstMatch = find isRight $ sepCap sep input

Does laziness short-ciruit firstMatch correctly?

jamesdbrock avatar Nov 14 '19 01:11 jamesdbrock