http://d.puremagic.com/issues/show_bug.cgi?id=5076


Peter Alexander <peter.alexander...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |peter.alexander...@gmail.co
                   |                            |m


--- Comment #1 from Peter Alexander <peter.alexander...@gmail.com> 2010-10-19 
00:20:20 PDT ---
This actually seems to be a common pattern.

By "this", I mean:

auto foo(T value)
{
  T copy = value.dup;
  modify(copy);
  return copy;
}

"modify" here could be sort, reverse, schwartzSort, partition etc. which would
give you sorted, reversed, schwartzSorted and partitioned. It's also the same
as defining op+ in terms of op+=.

I have no idea what you would call foo though :-(

arr2 = transformed!(sort)(arr1);
arr2 = mutated!(sort)(arr1);
arr2 = modified!(sort)(arr1);
arr2 = copyModify!(sort)(arr1);

???

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to