www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - How does the function 'iota' get its name?

reply ccmywish <ccmywish qq.com> writes:
Hi, everyone!

I'm very new to D. I see a function called 
[iota](https://dlang.org/library/std/range/iota.html)

`Iota` seems a [Greek 
letter](https://en.wikipedia.org/wiki/Iota). Why does it relate 
to range?
Feb 12 2023
parent reply Steven Schveighoffer <schveiguy gmail.com> writes:
On 2/12/23 2:17 PM, ccmywish wrote:
 Hi, everyone!
 
 I'm very new to D. I see a function called 
 [iota](https://dlang.org/library/std/range/iota.html)
 
 `Iota` seems a [Greek letter](https://en.wikipedia.org/wiki/Iota). Why 
 does it relate to range?
It came from C++. See notes here: https://en.cppreference.com/w/cpp/algorithm/iota -Steve
Feb 12 2023
parent Sergey <kornburn yandex.ru> writes:
On Sunday, 12 February 2023 at 19:39:49 UTC, Steven Schveighoffer 
wrote:
 On 2/12/23 2:17 PM, ccmywish wrote:
 Hi, everyone!
 
 I'm very new to D. I see a function called 
 [iota](https://dlang.org/library/std/range/iota.html)
 
 `Iota` seems a [Greek 
 letter](https://en.wikipedia.org/wiki/Iota). Why does it 
 relate to range?
It came from C++. See notes here: https://en.cppreference.com/w/cpp/algorithm/iota -Steve
Which took it from APL https://aplwiki.com/wiki/Index_Generator
Feb 12 2023