Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save awalterschulze/05dd4dfa34726e8eb8870c931a322cf1 to your computer and use it in GitHub Desktop.
Save awalterschulze/05dd4dfa34726e8eb8870c931a322cf1 to your computer and use it in GitHub Desktop.
medium-derivative-of-a-regex-derive-answer-1.hs
derive "εb" 'b'
= (derive "ε" 'b') `concat` "b"
`or`
derive "b" 'b'
= "∅" `concat` "b"
`or`
"ε"
= "∅b|ε"
= "ε"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment