Skip to content

Instantly share code, notes, and snippets.

@nomelif
Created January 15, 2018 05:08
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 nomelif/2aee97163e6ca78127fefc95600d3c30 to your computer and use it in GitHub Desktop.
Save nomelif/2aee97163e6ca78127fefc95600d3c30 to your computer and use it in GitHub Desktop.
t _ [] = 0
t !n ('8':rest) = t (n+1) rest
t !n (')':rest) = n + (t n rest)
main = getLine >>= (\l -> print (t 0 l))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment