Skip to content

Additional array methods: subtract and intersection with array #3

@hokster7

Description

@hokster7

Thanks for putting this gem together, really useful!
I have a peculiar use case working with DateTimes, and I'm glad to say that this gem seems to be working just fine.

It'd be interesting to write a .subtract method on Array with signature subtract(Array<Range>, Array<Range>):Array<Range>, where the result is the first array of ranges subtracted by each of the ranges in the second array. See https://en.wikipedia.org/wiki/Subtraction

It'd also be interesting to write an .intersection method on Array with signature intersection(Array<Range>, Array<Range>):Array<Range>, where the result is first array's of ranges' intersections with each of the ranges in the second array.

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