Playing with what I like
qsort = lambda seq: [] if not seq else qsort(filter(lambda n: n<=seq[0], seq[1:]))+[seq[0]]+qsort(filter(lambda n: n>seq[0], seq[1:]))
sweet! I've never even tried recursion with lambda's but you know what they say about recursion with lambdas... they say they've never even tried recursion...... Mind blown
sweet! I've never even tried recursion with lambda's but you know what they say about recursion with lambdas... they say they've never even tried recursion...... Mind blown
ReplyDelete