Rémi Bardon
Rémi Bardon
> I found a bug, I'm fixing it. > > For some reason, `.drop10` can be called from an `AtLeast2`… which is super strange 🤔 > > ```swift > fileprivate...
After hours of searching how to make `drop10` type safe, I decided to remove it. It would probably never have been used anyway, as the use case is very specific.
Nested `NonEmpty` do not have type safe (non-throwing) initializers, how did I miss it? I'm adding them.
was a long commit… I had to change many things 😕 I see a few problems here: - I added a safe `atLeast2(_:_:)` initializer, but because of the `AtLeast2` type...
> 2. Try to remove the `OneMore` type, and use `NonEmpty` instead (with verbose type constraints, it might be possible, I'll see) The main problem with this is that I...
I'll probably do one more step, which is to make `NonEmpty` a `struct` which stores a `internal enum _NonEmpty`. This way, people won't be able to access and alter the...
I feel stupid… I realize I can't have type safe nesting if I'm using enums 🤦🏻♂️
I finally got it! Separating `WithMinimumCount` from `NonEmptyProtocol` allowed me to avoid the "Self or associated type requirement" compiler error 😪 This was what blocked me in so many tries...
@stephencelis I marked this pull request as ready to review, as I think it has enough tests, which all pass, covering every requirement I had in mind. I will start...
One thing I would like to add, but I'm not sure if it's a good idea, is an extension saying `AtLeast2(1, 2)` is of type `AtLeast2` by default, to avoid...