Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
An example of how you can use Design by Contract macros and Non-nullable type macros in Nemerle to write more reliable code
public FlushContentsTo([NotNull] outputStream : Stream) : uint
requires outputStream.CanWrite
def startPosition = 0;
def bytes = _heap.ToArray();
def writer = BinaryWriter(outputStream);
startPosition :> uint;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.