Skip to content

autumngray/intervalsets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

intervalsets

Implementation of a set of disjoint intervals.

Usage

var s = toIntervalSet({'A'..'Z', 'a'..'z'})
echo s # {'A'..'Z', 'a'..'z'}
excl(s, 'e'..'f')
echo s # {'A'..'Z', 'a'..'d', 'g'..'z'}
incl(s, 'e')
echo s # {'A'..'Z', 'a'..'e', 'g'..'z'}

echo toIntervalSet([0..0, 2..4, 5..6]) # {0, 2..6}

About

Sets of disjoint intervals

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages