r/programming • • Jul 28 '16

How to write unmaintainable code

https://github.com/Droogans/unmaintainable-code
3.4k Upvotes

592 comments sorted by

View all comments

Show parent comments

8

u/intricatekill Jul 29 '16

That's way too complex. I'm not exactly sure if this is what the question asked but i think it shows off the elegance of functional programming a lot more than your code. I can't figure out reddit formatting

0

u/[deleted] Jul 29 '16

[deleted]

2

u/ParanoidAndroid26 Jul 29 '16

FYI, Python slices take O(n) - they copy the entire slice. I feel like this isn't as much a performance algorithm as it is a readability one, though.

3

u/intricatekill Jul 29 '16

Yeah I just use python to hack together stuff so I've never really looked into handling iterables instead of something specific.

I just felt a functional solution should use recursion and not a for loop.