Why is it Called iota? [duplicate]
Asked Answered
F

3

5

C++11 introduced a function called iota. Which "Assigns to every element in the range [first,last) successive values of val, as if incremented with ++val after each element is written."

Can someone explain what "iota" means here though?

I looked up "iota" and it seems to have nothing to do with generating a range.

Feudalism answered 9/2, 2015 at 14:18 Comment(0)
L
9

Quoting this non-authoritative, but nonetheless correct, wiki:

The function is named after the integer function from the programming language APL.

In APL, the function (represented with the ninth letter of the Greek alphabet, iota) is used to create a zero-based array of consecutive, ascending integers of a specified length.

Lastex answered 9/2, 2015 at 14:20 Comment(1)
You could go further by explaining to the uninitiated that this symbol is the Greek letter "Iota".Jameyjami
E
6

It's a Greek letter used in mathematics to denote a set of consecutive numbers. Iota use in APL.

Enlistee answered 9/2, 2015 at 14:21 Comment(0)
S
2

This page has a very plausible-seeming explanation:

The Greek letter iota is used in the programming language APL to generate a sequence of consecutive integers.

Syndic answered 9/2, 2015 at 14:20 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.