Updating 'create' and 'replicate'#2
Updating 'create' and 'replicate'#2latkin wants to merge 2 commits intofsharp:masterfrom latkin:master
Conversation
|
My resolution was to treat "create" as an imperative operation specific to imperative data structures (since it implies something about identity). Hence only have it on Array. And use "replicate" for the functional operation. Thoughts? |
|
But the operations are exactly the same. Why is one deemed "procedural" and the other "functional"? The only difference is the name, and surely the name given does not affect the inherent functional-ness or procedural-ness of the operation. |
|
For me |
|
Maybe an other name? |
|
[ Edited after, cc @forki ] Yes. And both One way to normalize would be with these additional ones for Seq:
Note, I'm not super happy about the name Cheers |
Existing functions
Array.createandList.replicatedo the same thing. I movedcreateup to the main list of functions. How do we want to handle the duplication?createandreplicatefor all collection types (safest option)replicatebetter, but my hunch is thatArray.createis used more often)I went with option 1 in this change.