linksplatform / linksplatform/Data.Doublets.Sequences

Add simplest possible left and right "stairs" converters for sequences.

Open
#30 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement help wanted sweep
Dominant language
C#
Stars
1
Forks
1
PR merge metrics
No merged PRs in 30d

Description

![image](https://github.com/linksplatform/Data.Doublets.Sequences/assets/1431904/e1272ee3-8f34-4d75-a626-4bd6e598bd20)

![image](https://github.com/linksplatform/Data.Doublets.Sequences/assets/1431904/4eb12283-3e94-4f5d-97ed-0610d2baf5a3)

Do not use ∅, pictures are wrong.

## The correct source example is:

```
[1, 2, 3, 4]
```

## Two ways to transform this into sequences

## DescendingVariantConverter

This converter starts with a pair of two first elements and the goes "down the hill".
```
(((1 2) 3) 4)
```

Where `(1 2)` means, that it's ID used to make next pair and so on.

```
var doubletId = _links.GetOrCreate(sequence[0], sequence[1])
```

## AscendingVariantConverter

In that case, converter starts from the end of list/sequence/array.

The complete result will be:

```
(1 (2 (3 4)))
```

Where `(3 4)` means, that it's ID used to make next pair and so on.

```
var doubletId = _links.GetOrCreate(sequence[i-1], sequence[i])
```

## P.S.

Both sequences should be created at `./csharp/Platform.Data.Doublets.Sequences/Converters` folder.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting the ./csharp/Platform.Data.Doublets.Sequences/Converters folder and the sequence examples in this issue. Implement both converters so [1, 2, 3, 4] produces the specified descending and ascending nested pair forms, without using ∅ or the incorrect pictures.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
data
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.