December 13, 2010 Re: Removing an object from a range | ||||
---|---|---|---|---|
| ||||
Posted in reply to Steven Schveighoffer | On 12/13/10, Steven Schveighoffer <schveiguy@yahoo.com> wrote: > does this work? > Yes, ty. But I think there's a typo in std.algorithm.remove: Range remove(alias pred, SwapStrategy s = SwapStrategy.stable, Range)(Range range); Reduces the length of the bidirectional range range by only keeping elements that satisfy pred. This should probably be "by only keeping elements that *do not* satisfy pred.", right? Here's a short example where I just shorten the length of an array: http://pastebin.com/gL6EYJzd |
December 13, 2010 Re: Removing an object from a range | ||||
---|---|---|---|---|
| ||||
Does anyone know if there's any way I can get special highlighting for lambda functions in say, Vim? It gets hard to distinguish between regular parameters and one-liner lambdas, if I could change the background color of a lambda it could really help out..
On 12/13/10, Andrej Mitrovic <andrej.mitrovich@gmail.com> wrote:
> On 12/13/10, Steven Schveighoffer <schveiguy@yahoo.com> wrote:
>> does this work?
>>
>
> Yes, ty. But I think there's a typo in std.algorithm.remove:
>
> Range remove(alias pred, SwapStrategy s = SwapStrategy.stable,
> Range)(Range range);
> Reduces the length of the bidirectional range range by only
> keeping elements that satisfy pred.
>
> This should probably be "by only keeping elements that *do not* satisfy pred.", right?
>
> Here's a short example where I just shorten the length of an array: http://pastebin.com/gL6EYJzd
>
|
December 13, 2010 Re: Removing an object from a range | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrej Mitrovic | Andrej Mitrovic Wrote: > Does anyone know if there's any way I can get special highlighting for lambda functions in say, Vim? It gets hard to distinguish between regular parameters and one-liner lambdas, if I could change the background color of a lambda it could really help out.. Off the top of my head I can't think of how it would be done. But you are welcome to make a feature request: https://github.com/he-the-great/d.vim |
Copyright © 1999-2021 by the D Language Foundation