collections - Fastest way to implement subset in Scala -


so according wikipedia (proposition 8) following statements equivalent:

  • a is subset of b
  • a intersection b equals a
  • a union b equals b
  • a difference b equals empty set

scala gives union, intersection , difference operators, set equality.

given that, efficient (runtime) way implement subset function in scala?


Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -