Skip to content

split doesn't handle modified ranges #6

@aldrikfr

Description

@aldrikfr

Describe the bug
if split is called on a modified range, split actually ignores the modifiers

To Reproduce

utop # Range.(from 1 5000 |> map ~f:((+) 3)  |> Number.(split (gtz_from_int_exn 100) (gtz_from_int_exn 24)) |> List.map to_string);;
- : string list =
["Nat:4808:5000"; "Nat:4599:4807"; "Nat:4390:4598"; "Nat:4181:4389";
 "Nat:3972:4180"; "Nat:3763:3971"; "Nat:3554:3762"; "Nat:3345:3553";
 "Nat:3136:3344"; "Nat:2927:3135"; "Nat:2718:2926"; "Nat:2509:2717";
 "Nat:2300:2508"; "Nat:2091:2299"; "Nat:1882:2090"; "Nat:1673:1881";
 "Nat:1464:1672"; "Nat:1255:1463"; "Nat:1046:1254"; "Nat:837:1045";
 "Nat:628:836"; "Nat:419:627"; "Nat:210:418"; "Nat:1:209"]

Expected behavior
The same result plus 3; and with de mod flag instead of Nat

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions