Co-Authored-By: Ulf Norell <ulf.norell@gmail.com>
This commit is contained in:
Radosław Rowicki 2019-08-30 13:44:26 +02:00 committed by GitHub
parent 076d635dbe
commit 256aadd575
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -57,7 +57,7 @@ namespace List =
_::t => length_(t, acc + 1)
function from_to(a : int, b : int) : list(int) = from_to_(a, b, [])
function from_to(a : int, b : int) : list(int) = [a..b]
private function from_to_(a, b, acc) =
if (a > b) acc else from_to_(a, b - 1, b :: acc)