ADT
aaron-thesis
arm-eh
ast-experimental
cleanup-dtors
deferred_resn
demangler
enum
forall-pointer-decay
jacob/cs343-translation
jenkins-sandbox
new-ast
new-ast-unique-expr
new-env
no_list
persistent-indexer
pthread-emulation
qualifiedEnum
with_gc
Last change
on this file since 5e5dbc2 was ac4dad2, checked in by Peter A. Buhr <pabuhr@…>, 7 years ago |
shorten experimental code
|
-
Property mode
set to
100644
|
File size:
352 bytes
|
Rev | Line | |
---|
[604e76d] | 1 | #pragma once
|
---|
| 2 |
|
---|
[ac4dad2] | 3 | forall( otype T ) {
|
---|
| 4 | struct node;
|
---|
| 5 | struct stack {
|
---|
| 6 | node(T) * head;
|
---|
| 7 | };
|
---|
[604e76d] | 8 |
|
---|
[ac4dad2] | 9 | void ?{}( stack(T) & s );
|
---|
| 10 | void ?{}( stack(T) & s, stack(T) t );
|
---|
| 11 | void ^?{}( stack(T) & s);
|
---|
| 12 | void clear( stack(T) & s );
|
---|
[604e76d] | 13 |
|
---|
[ac4dad2] | 14 | stack(T) ?=?( stack(T) & s, stack(T) t );
|
---|
| 15 | _Bool empty( const stack(T) & s );
|
---|
| 16 | void push( stack(T) & s, T value );
|
---|
| 17 | T pop( stack(T) & s );
|
---|
| 18 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.