Longest common suffix: Difference between revisions

m
→‎{{header|Python}}: Extended domain to empty and single-string lists.
m (→‎{{header|Python}}: Named the allSame predicate)
m (→‎{{header|Python}}: Extended domain to empty and single-string lists.)
Line 361:
def firstCharPrepended(s, cs):
return cs[0] + s
return list(xs) if 2 > len(xs) else reduce(
firstCharPrepended,
takewhile(
9,655

edits