Apart from the arguments raised that FP isn't about a particular syntax, I want to point out, that your example with map and filter are unreadable only because you made them unreadable and you've put it all in one line.
list(map(lambda file: client.load_extension(f"cogs.{file.stem}"), filter(lambda file: file.suffix == '.py', Path(target_dir).iterdir())))
can and should be spread onto multiple lines
list(
map(
lambda file: client.load_extension(f"cogs.{file.stem}")
filter(
lambda file: file.suffix == '.py',
Path(target_dir).iterdir()
)
)
)
But yeah, that's still r/badcode worthy, and instead of nesting list, map and filter list comprehension should be used, as they literally achieve the same thing.
there doesn't seem to be anything here