From 1fbc85f6dfa4f9e5dc3cb8fc17a43dc088156c52 Mon Sep 17 00:00:00 2001 From: Leonardo de Moura Date: Mon, 18 May 2015 15:16:29 -0700 Subject: [PATCH] fix(util/list_fn): add missing file fixes #606 --- src/util/list_fn.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/util/list_fn.cpp diff --git a/src/util/list_fn.cpp b/src/util/list_fn.cpp new file mode 100644 index 0000000000..e5ecc9b2a3 --- /dev/null +++ b/src/util/list_fn.cpp @@ -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 mk_list_range(unsigned from, unsigned to) { + list r; + unsigned i = to; + while (i > from) { + i--; + r = cons(i, r); + } + return r; +} +}