Skip to content

Instantly share code, notes, and snippets.

@PhilipWitte
Last active December 13, 2015 20:18
Show Gist options
  • Save PhilipWitte/4969024 to your computer and use it in GitHub Desktop.
Save PhilipWitte/4969024 to your computer and use it in GitHub Desktop.
Factory syntax
type Foo =
value : int
init Foo.new(v) =
value = v
proc Foo.bar =
echo(value)
proc main =
var f = Foo.new(1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment