News for hackers. Stuff that matters.
Re:Ownership and Borrowing in D by paavohtl on Tuesday July 16, 2019 @03:48AM (#20448247)
You can do that without HKT, using FromIterator (which is also used by the widely used iterator method "collect").

Here is an implementation: https://play.rust-lang.org/?version=stable&mode=release&edit...

Fill is also possible, using the same trait and iterators.

Re:Ownership and Borrowing in D by logicchains on Tuesday July 16, 2019 @06:19AM (#20448810)
I stand corrected. Could the same technique also be used to have a struct parameterised by C and T that had a C as a member?
Re:Ownership and Borrowing in D by leshow on Tuesday July 16, 2019 @09:42AM (#20449911)
You can't partially apply type parameters in rust, that is HKT. But traits & associated types in traits get you pretty far.