Initial Dever 0.0.1
This commit is contained in:
commit
81233d098c
1479 files changed
+163782
No files matched your search
@@ -0,0 +1,24 @@
|
||||
public type Row {
|
||||
id: Id
|
||||
count: Int
|
||||
}
|
||||
|
||||
public type Problem {
|
||||
error Rejected(message: Text)
|
||||
}
|
||||
|
||||
public adjust(value: Int) (answer: Int) {
|
||||
answer = value + 1
|
||||
}
|
||||
|
||||
public make(value: Int) (row: Row) {
|
||||
row = Row { id = dever.id.fromText("雪")
|
||||
count = value }
|
||||
}
|
||||
|
||||
public positive(value: Int >= 0) (answer: Int) {
|
||||
answer = value
|
||||
}
|
||||
public positive(value: Int < 0) (answer: Int) {
|
||||
fail(Problem.Rejected("negative"))
|
||||
}
|
||||
Reference in new issue
Block a user