refactoring
This commit is contained in:
parent
0085795902
commit
fafa1a5c5f
21 changed files with 5 additions and 5 deletions
22
YavscLib/IT/ICode.cs
Normal file
22
YavscLib/IT/ICode.cs
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace YavscLib
|
||||
{
|
||||
public interface ILetter<T> : IEqualityComparer<T> {
|
||||
}
|
||||
public interface IWord<TLetter> where TLetter : ILetter<TLetter>
|
||||
{
|
||||
IWord<TLetter> Aggregate(TLetter other);
|
||||
}
|
||||
|
||||
public interface ICode<TLetter> : IEnumerable<TLetter> where TLetter : ILetter<TLetter>
|
||||
{
|
||||
/// <summary>
|
||||
/// Checks that (b!=c) => a.b != a.c
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
bool Validate();
|
||||
|
||||
IWord<TLetter> CreateWord(TLetter letter);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue