Your skill will accomplish what the force of many cannot |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I've been trying to learn Haskell for greater good. It's a functional language, which (among other things) means functions are first class citizens: you can pass them as arguments to other functions, return them from functions, and easily combine them with other functions. e.g. whereas in Perl you can create a new string within Haskell you can create a new function with (assuming all the argument types match up). That's what the Compose function I wrote does. I thought of doing that after noticing how similar your various sort functions were, and how they could be built by composing/layering basic operations on top of one another. I'm not suggesting you write your code like that, I wrote it mainly out of curiosity to see what such a functional style would look like in Perl. In reply to Re^5: short sorts
by Arunbear
|
|