Skip to content

Instantly share code, notes, and snippets.

@deque-blog
Created July 18, 2017 19:59
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save deque-blog/f8f5e5b7a37b5b4d8e034d0d83e1a0eb to your computer and use it in GitHub Desktop.
sumLength : StatelessStep Int String
sumLength res str = res + fromNat (length str)
foldl sumLength 0 ["abc", "de", "", "fghij"]
> 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment