3
$\begingroup$

There is a function which is usually called range in other languages: it takes a natural n, and returns a list of naturals [0,1,2,...,n-1]. Does the Coq standard library have this function, and if so, what is it called?

$\endgroup$

1 Answer 1

3
$\begingroup$

It's called seq, although it's not literally what you ask for, since it receives two arguments: the starting point and the length. So range n = seq 0 n.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.