Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
3
Task/Enumerations/E/enumerations-1.e
Normal file
3
Task/Enumerations/E/enumerations-1.e
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
def apple { to value() { return 0 } }
|
||||
def banana { to value() { return 1 } }
|
||||
def cherry { to value() { return 2 } }
|
||||
6
Task/Enumerations/E/enumerations-2.e
Normal file
6
Task/Enumerations/E/enumerations-2.e
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
interface Fruit guards FruitStamp {}
|
||||
def apple implements FruitStamp {}
|
||||
def banana implements FruitStamp {}
|
||||
def cherry implements FruitStamp {}
|
||||
|
||||
def eat(fruit :Fruit) { ... }
|
||||
4
Task/Enumerations/E/enumerations-3.e
Normal file
4
Task/Enumerations/E/enumerations-3.e
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
def [Fruit, [=> apple, => banana, => cherry]] := makeEnumeration()
|
||||
|
||||
def [Fruit, [=> apple, => banana, => cherry]] :=
|
||||
makeEnumeration(0, ["apple", "banana", "cherry"])
|
||||
Loading…
Add table
Add a link
Reference in a new issue