Closed seliopou closed 9 years ago
@seliopou Great, thanks! Maybe add a readme item for this into the Composition
section, too.
@sompylasar Done.
@trinary, have a look and see what you think. It's my opinion that it's worthwhile having something like this in the library.
Agreed. I think there's another tweak to make when it comes to sequenced functions, though:
var t1 = d3Transform().translate(function(d) { return [d,1]; });
var t2 = d3Transform().translate(function(d) { return [1,d]; });
var seq = t1.seq(t2);
seq(5) => "translate(5,1) translate(1,)"
I started to write some tests and ran into that. :)
@seliopou I haven't taken a second look on this yet, did you want me to dig in?
Ugh, sorry been distracted with other things. Wanna have a look?
I have this working with a couple tests on https://github.com/trinary/d3-transform/tree/seliopou-master, take a look @seliopou . I think we just need to deal with the evaluated seq the same as a chain. Sorry it took so long to work on this. :) If that change looks ok you can pull it back on this branch and merge, I can update npm/bower whenever after that. Also you're added as a collaborator because why on earth wasn't that already done?
I'll change the operation name (
seq
currently) to whatever the consensus name is.Closes #14