enums - Scala: give a constructor an enumeration and a function that takes that enumeration as a parameter -
i'm wondering if there way write following in scala:
class test(enumeration:enumeration, f:enumeration.value=>string){ // add fields here }
class test[a <: enumeration](val enumeration: a, f: a#value => string) { // class body }
wiki
Comments
Post a Comment