Idiomatic adjacent_difference
    anonymous via Digitalmars-d-learn 
    digitalmars-d-learn at puremagic.com
       
    Fri Oct 16 08:02:53 PDT 2015
    
    
  
On Friday, October 16, 2015 02:03 PM, Per Nordlöw wrote:
> zip(r, r.dropOne).map!((t) => t[1]-t[0]);
You should r.save one or both of those. The dropOne may affect both 
instances if you don't .save.
By the way, what's the point of `dropOne` over `drop(1)`? It's not shorter. 
Does it do anything subtly different?
    
    
More information about the Digitalmars-d-learn
mailing list