# How to define an ADT?

  1. Open the respective .kdata file.

    For example to define payment mode as an ADT, open LotteryData.kdata file in eclipse.

  2. Define the adt using keyword adt as follows:

    adt PaymentType(amount:Int) => 
    		Cheque(amount:Int,dateIssued:CalendarDate) | Cash(amount:Int)
    

    Note: Dont forget to save the file

  3. enter sbt shell, run compile command to access the enum.

# Sample Usage:

val payment = Cheque(amount = 10000, dateIssued = grab[TimeService].todayAtLocal)