@branmcconnell@mattpocockuk Possibly?
AFAIK an array literal can't be cast this way. Try the form `foo: P -> Q<P>` where P is the tuple (not just array) of number literals, and Q<P> checks if P satisfied ArrayWithRequired, or never.
Uniqueness & inclusion can be checked by building a map? also in Q.
If you want an electrician, don't hire the entire construction team.
Because the #1 rule of dependency management: "Depend only on what's needed"
It's simple, and your favourite IoC container mostly likely breaks it.
Just blogged https://t.co/x1CNTMFH23
@d_rawers I empathise with the "nonobvious code" sentiment but code like,
ReadonlyList<int> numbers = new List<int>(...)
clearly communicates the author's intention (constraints) that "numbers" should not be mutated. ๐
Being able to expose capacities selectively is essential to ISP.
If you get monads, but not yet the State monad, this one is for you!
"...it brings non-local states, it encodes a function, and often appears to be dark magic."
[blogged] State Monad: a bit of currying goes a long way
https://t.co/9hfwkoXqgv
#Haskell