diff --git a/limmutable.c b/limmutable.c index 1e6c302..3a7cec4 100644 --- a/limmutable.c +++ b/limmutable.c @@ -4,11 +4,13 @@ * that can be used to declare immutable classes, like so: * * immutable = require 'immutable' -* local Foo = immutable({"baz","qux"}) +* local Foo = immutable({"baz","qux"}, {class_var=5}) * local foo = Foo("hello", 99) +* assert(foo.baz == "hello") * assert(not pcall(function() foo.x = 'mutable' end)) * local t = {[foo]="it works"} * assert(t[Foo("hello", 99)] == "it works") +* assert(foo.class_var == 5) * * Instances *are* garbage collected. */