Currently, there's three leading variants for the pipeline operator proposal:
Here's what I want Object.then/Object.chain (and async variants) to be used like:
-
F#-style:
coll |> Object.then(...funcs)
coll |> Object.asyncThen(...funcs)
coll |> Object.chain(...funcs)
coll |> Object.asyncChain(...funcs)
-
"Smart" pipelines:
coll |> Object.then(#, ...funcs)
coll |> Object.asyncThen(# ...funcs)
coll |> Object.chain(# ...funcs)
coll |> Object.asyncChain(# ...funcs)
-
this-bound pipelines:
coll::Object.then(...funcs)
coll::Object.asyncThen(...funcs)
coll::Object.chain(...funcs)
coll::Object.asyncChain(...funcs)
Here's how I'll need to go for each variant:
-
F#-style:
Object.then(...funcs) -> coll => result
Object.asyncThen(...funcs) -> coll => result
Object.chain(...funcs) -> coll => result
Object.asyncChain(...funcs) -> coll => result
-
"Smart" pipelines:
Object.then(coll, ...funcs) -> result
Object.asyncThen(coll, ...funcs) -> result
Object.chain(coll, ...funcs) -> result
Object.asyncChain(coll, ...funcs) -> result
-
this-bound pipelines:
Object.then.call(coll, ...funcs) -> result
Object.asyncThen.call(coll, ...funcs) -> result
Object.chain.call(coll, ...funcs) -> result
Object.asyncChain.call(coll, ...funcs) -> result
I currently have it aligned with a mixture of "smart" and F#-style throughout the redesign, but I'd like to stick with what works with the pipeline operator of choice.
Currently, there's three leading variants for the pipeline operator proposal:
this-bound pipelinesHere's what I want
Object.then/Object.chain(and async variants) to be used like:F#-style:
coll |> Object.then(...funcs)coll |> Object.asyncThen(...funcs)coll |> Object.chain(...funcs)coll |> Object.asyncChain(...funcs)"Smart" pipelines:
coll |> Object.then(#, ...funcs)coll |> Object.asyncThen(# ...funcs)coll |> Object.chain(# ...funcs)coll |> Object.asyncChain(# ...funcs)this-bound pipelines:coll::Object.then(...funcs)coll::Object.asyncThen(...funcs)coll::Object.chain(...funcs)coll::Object.asyncChain(...funcs)Here's how I'll need to go for each variant:
F#-style:
Object.then(...funcs) -> coll => resultObject.asyncThen(...funcs) -> coll => resultObject.chain(...funcs) -> coll => resultObject.asyncChain(...funcs) -> coll => result"Smart" pipelines:
Object.then(coll, ...funcs) -> resultObject.asyncThen(coll, ...funcs) -> resultObject.chain(coll, ...funcs) -> resultObject.asyncChain(coll, ...funcs) -> resultthis-bound pipelines:Object.then.call(coll, ...funcs) -> resultObject.asyncThen.call(coll, ...funcs) -> resultObject.chain.call(coll, ...funcs) -> resultObject.asyncChain.call(coll, ...funcs) -> resultI currently have it aligned with a mixture of "smart" and F#-style throughout the redesign, but I'd like to stick with what works with the pipeline operator of choice.