Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
12
Task/Abstract-type/Nim/abstract-type.nim
Normal file
12
Task/Abstract-type/Nim/abstract-type.nim
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
type
|
||||
Comparable = concept x, y
|
||||
(x < y) is bool
|
||||
|
||||
Stack[T] = concept s, var v
|
||||
s.pop() is T
|
||||
v.push(T)
|
||||
|
||||
s.len is Ordinal
|
||||
|
||||
for value in s:
|
||||
value is T
|
||||
Loading…
Add table
Add a link
Reference in a new issue