I hereby claim:
- I am andreaskostler on github.
- I am kandre1980 (https://keybase.io/kandre1980) on keybase.
- I have a public key ASAXdg4Wt3DUsCSjWq9LXIf6oCNka0lb1LbHvzYhbEyKMAo
To claim this, I am signing this object:
object UnionTypes { | |
private type ¬[A] = A => Nothing | |
private type ¬¬[A] = ¬[¬[A]] | |
private type ∈[S, T <: Disjunction] = ¬¬[S] <:< ¬[T#D] | |
private type ∉[S, T <: Disjunction] = ¬¬[S] <:!< ¬[T#D] | |
/** `S` is `T`. */ | |
type Is[S, T] = ∈[S, OneOf[T]#Or[Nothing]] |
package model | |
import algebra.DeleteDealerErrors.SellIdError | |
import cats.MonadError | |
import play.api.libs.json._ | |
import play.api.mvc.PathBindable | |
import scala.util.Try | |
final case class SellId(value: String) |
I hereby claim:
To claim this, I am signing this object:
// Super simple, recursive flatten | |
// The _ means we have a weakly polymorphic type | |
// i.e. we don't care about what type _ is (it will, or will not, be resolved later) | |
// the type signature for flatMap on Seq is Seq[A] => (A => Seq[B]) => Seq[B] | |
def flatten(s: Seq[_]): Seq[_] = s flatMap { | |
case s: Seq[_] => flatten(s) // If s is a Seq, we recursively flatten | |
case s => Seq(s) // If s is atomic, we're done; just package up s | |
} | |
// degenerate case |