Content deleted Content added
→Problem description: Also for 2nd C# snippet, less uselessly public members Tags: Mobile edit Mobile web edit |
→Problem Solution using Object Algebra: C# snippet for Problem Solution has only the strictly necessary public members Tags: Mobile edit Mobile web edit |
||
Line 199:
<syntaxhighlight lang="c#" line="1">
{
T Lit(int n);
Line 205:
}
{
public IEvalExp Lit(int n)
Line 218:
}
{
public static T AddOneToTwo(ExpAlgebra<T> ae) => ae.Add(ae.Lit(1), ae.Lit(2));
Line 227:
<syntaxhighlight lang="c#" line="1">
{
string Print();
}
{
{
N = n;
}
public string Print()
Line 247:
}
{
{
Left = left;
Line 255:
}
public string Print()
Line 265:
}
{
public IPrintExp Add(IPrintExp left, IPrintExp right)
Line 278:
}
{
}
</syntaxhighlight>
|