Python - Haskell comparison: delete all files matching *m3u
Python is a not-bad language... much nicer than Perl. Not as rigid as Haskell. Many more libraries and applications than Haskell. And Python was used in this years winning ICFP as well. And Python stole list comprehensions for Python. And PYthon combined object, functional and imperative in a prettier more understandable way than Ocaml did.
Here is a script I whipped up in Python to remove all m3u files from my music dir... the shell 1-liner of
find ~/Music -name '*m3u' | xargs rm
failed because find did not properly escape spaces and parentheses.
So here's my script:
from path import path
p = path('/Users/tbrannon/Music')
dirs = p.walkdirs('*')
for d in dirs:
for f in d.files('*m3u'):
What would the Haskell look like?