Circular Buffer

Russel Winder russel at winder.org.uk
Wed Feb 12 01:49:49 PST 2014


On Mon, 2014-02-10 at 11:33 +0000, bearophile wrote:
> Russel Winder:
> 
> >This really needs to get onto the D website somewhere.
> 
> retro+cycle is very simple code, you can also combine them:
> 
> alias retroCycle = compose!(cycle, retro);

point-free composition. We like this :-)

> Ranges and algorithms can be combined together in so many ways 
> :-) For an imperative/OO programmer writing code based on lazy 
> ranges and higher order functions is a new kind of programming 
> that should be learnt patiently, but it's not hard and it doesn't 
> contain many low-level pitfalls :-)

Tell me about it. I run training courses trying to get people to do this
higher-order stuff, and meta-object protocol stuff, in Python, Java and
Groovy (with some Scala) and some get it and some don't.

Rule 1: don't mention monads.

-- 
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder at ekiga.net
41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel at winder.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder



More information about the Digitalmars-d-learn mailing list