blob: eeb2eb00774ace2b7f3f8b6ae8926f43257bd81e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
#include "sugar.hpp"
#include "concepts.hpp"
using namespace intellect::level1;
using namespace concepts;
namespace intellect {
namespace level1 {
ref operator-(ref a, ref b)
{
return ref(a.name() + "-" + b.name());
}
ref a(ref group)
{
static unsigned long long gid = 0;
ref ret(group.name() + "-" + std::to_string(gid++));
ret.link(is, group);
ret.link(is, anonymous);
return ret;
}
ref a(ref group, ref name)
{
if (!name.isa(group)) {
name.link(is, group);
}
return name;
}
ref an(ref group)
{
return a(group);
}
ref an(ref group, ref name)
{
return a(group, name);
}
}
}
|