Closed ruancomelli closed 1 year ago
Converted to draft because of https://github.com/pytoolz/toolz/issues/523#issuecomment-1163861266. We should first settle on the exact desired behavior before having this PR merged.
I'll close this PR for now since it is unclear how to proceed (see discussion at https://github.com/pytoolz/toolz/issues/523). If it becomes relevant again, we can either open a new PR or reopen it.
Overview
Add a new
composable
class for functions that can be composed via the pipe operator. This idea originated from and was discussed in https://github.com/pytoolz/toolz/issues/523.In this implementation, I decided not to include any type-annotations. This is because most of (all?) the project lacks type-annotations. Adding such annotations is probably a PR of its own.
Future work
composable
as well, likecurry
,juxt
, andexcepts
, as suggested in https://github.com/pytoolz/toolz/issues/523#issuecomment-1037008717.pipe
function by creating apipeable
class.