/src/Core/List.cs
C# | 42 lines | 27 code | 3 blank | 12 comment | 0 complexity | 8c0a2b64470f5165b9d31477fee36363 MD5 | raw file
- /////////////////////////////////////////////////////////////////////////////////
- // Paint.NET //
- // Copyright (C) dotPDN LLC, Rick Brewster, Tom Jackson, and contributors. //
- // Portions Copyright (C) Microsoft Corporation. All Rights Reserved. //
- // See src/Resources/Files/License.txt for full licensing and attribution //
- // details. //
- // . //
- /////////////////////////////////////////////////////////////////////////////////
-
- namespace PaintDotNet
- {
- /// <summary>
- /// A very simple linked-list class, done functional style. Use null for
- /// the tail to indicate the end of a list.
- /// </summary>
- public sealed class List
- {
- private readonly object _head;
- public object Head
- {
- get
- {
- return _head;
- }
- }
-
- private readonly List _tail;
- public List Tail
- {
- get
- {
- return _tail;
- }
- }
-
- public List(object head, List tail)
- {
- _head = head;
- _tail = tail;
- }
- }
- }