Fix var
This commit is contained in:
parent
b22eeffc3d
commit
2e6c01cb75
@ -80,7 +80,7 @@ namespace List =
|
|||||||
* `b` only if `(b - a) mod step == 0`. `step` should be bigger than 0.
|
* `b` only if `(b - a) mod step == 0`. `step` should be bigger than 0.
|
||||||
*/
|
*/
|
||||||
function from_to_step(a : int, b : int, s : int) : list(int) =
|
function from_to_step(a : int, b : int, s : int) : list(int) =
|
||||||
require(step > 0, "List.from_to_step: non-positive step")
|
require(s > 0, "List.from_to_step: non-positive step")
|
||||||
from_to_step_(a, b - (b-a) mod s, s, [])
|
from_to_step_(a, b - (b-a) mod s, s, [])
|
||||||
private function from_to_step_(a : int, b : int, s : int, acc : list(int)) : list(int) =
|
private function from_to_step_(a : int, b : int, s : int, acc : list(int)) : list(int) =
|
||||||
if(b < a) acc
|
if(b < a) acc
|
||||||
|
Loading…
x
Reference in New Issue
Block a user