Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolayPianikov committed Aug 28, 2024
1 parent a0d0347 commit c5e3790
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 35 deletions.
10 changes: 3 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,14 @@ enum State { Alive, Dead }
### Here's our implementation

```c#
class CardboardBox<T>(T content) : IBox<T>
{
public T Content { get; } = content;
}
record CardboardBox<T>(T Content): IBox<T>;

class ShroedingersCat(Lazy<State> superposition) : ICat
class ShroedingersCat(Lazy<State> superposition): ICat
{
// The decoherence of the superposition
// at the time of observation via an irreversible process
public State State => superposition.Value;
public State State => superposition.Value;
}

```

> [!IMPORTANT]
Expand Down
10 changes: 3 additions & 7 deletions readme/ReadmeTemplate.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,14 @@ enum State { Alive, Dead }
### Here's our implementation

```c#
class CardboardBox<T>(T content) : IBox<T>
{
public T Content { get; } = content;
}
record CardboardBox<T>(T Content): IBox<T>;

class ShroedingersCat(Lazy<State> superposition) : ICat
class ShroedingersCat(Lazy<State> superposition): ICat
{
// The decoherence of the superposition
// at the time of observation via an irreversible process
public State State => superposition.Value;
public State State => superposition.Value;
}

```

> [!IMPORTANT]
Expand Down
9 changes: 2 additions & 7 deletions samples/ShroedingersCat/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,9 @@ public enum State

// Here is our implementation

public class CardboardBox<T>(T content) : IBox<T>
{
public T Content { get; } = content;

public override string ToString() => $"[{Content}]";
}
public record CardboardBox<T>(T Content) : IBox<T>;

public class ShroedingersCat(Lazy<State> superposition) : ICat
public class ShroedingersCat(Lazy<State> superposition): ICat
{
// The decoherence of the superposition
// at the time of observation via an irreversible process
Expand Down
9 changes: 2 additions & 7 deletions samples/ShroedingersCatNativeAOT/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,9 @@ public enum State
Dead
}

public class CardboardBox<T>(T content) : IBox<T>
{
public T Content { get; } = content;

public override string ToString() => $"[{Content}]";
}
public record CardboardBox<T>(T Content) : IBox<T>;

public class ShroedingersCat(Lazy<State> superposition) : ICat
public class ShroedingersCat(Lazy<State> superposition): ICat
{
// The decoherence of the superposition
// at the time of observation via an irreversible process
Expand Down
9 changes: 2 additions & 7 deletions samples/ShroedingersCatTopLevelStatements/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,9 @@ public enum State
Dead
}

public class CardboardBox<T>(T content) : IBox<T>
{
public T Content { get; } = content;

public override string ToString() => $"[{Content}]";
}
public record CardboardBox<T>(T Content) : IBox<T>;

public class ShroedingersCat(Lazy<State> superposition) : ICat
public class ShroedingersCat(Lazy<State> superposition): ICat
{
// The decoherence of the superposition
// at the time of observation via an irreversible process
Expand Down

0 comments on commit c5e3790

Please sign in to comment.