erg_compiler 0.6.53

Centimetre: the Erg compiler
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
.Set!: ClassType
.Set!.
    '''erg
    s = !{}
    s2 = s.copy()
    s.add!(1)
    assert s2 == {}
    '''
    copy: (self: Ref Set!) -> Set!
    '''erg
    s = !{}
    s.add!(1)
    assert s == {1}
    '''
    add!: |T|(self: RefMut(Set!(T)), x: T) => NoneType