Don't work on strings in 43.
Pattern matching on digits instead of indexing.
Indentation fix.
Replaced lambda with function composition.