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

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -