-
Notifications
You must be signed in to change notification settings - Fork 0
Curry all combinators #4
base: master
Are you sure you want to change the base?
Conversation
Having an immutable `Curry` class allows creating a curry from any callable. Having this as a base class will allow additional functionality such as `Partial` to be added with minimal effort.
Having all combinators curried by default provides much greater flexibility for point-free programming.
Wow! This looks really great! As an update, my broadband has gone on holiday, estimated to be fixed within the next 12 hours, sigh... Once it's back up, I'll have a proper look at this. Regardless, really great work! |
}, | ||
"files": [ | ||
"src/functions.php", | ||
"src/curried.php" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should both be exposed? The "uncurried" ones aren't all totally uncurried (thinking of compose
, in particular), so it might be more helpful to hide the "original" functions and move them out of sight and mind.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They have to be imported somehow, or PHP won't find them. However, both are contained in namespaces so they won't pollute the global namespace.
This builds off of #3 and makes all combinators curried by default.
See 7608e66 for changes.