parent
c61c049152
commit
1fbc85f6df
1 changed files with 19 additions and 0 deletions
19
src/util/list_fn.cpp
Normal file
19
src/util/list_fn.cpp
Normal file
|
@ -0,0 +1,19 @@
|
|||
/*
|
||||
Copyright (c) 2015 Microsoft Corporation. All rights reserved.
|
||||
Released under Apache 2.0 license as described in the file LICENSE.
|
||||
|
||||
Author: Leonardo de Moura
|
||||
*/
|
||||
#include "util/list.h"
|
||||
|
||||
namespace lean {
|
||||
list<unsigned> mk_list_range(unsigned from, unsigned to) {
|
||||
list<unsigned> r;
|
||||
unsigned i = to;
|
||||
while (i > from) {
|
||||
i--;
|
||||
r = cons(i, r);
|
||||
}
|
||||
return r;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue