Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about Koan 14 - DotNetCollections #83

Open
MortalFlesh opened this issue Nov 27, 2018 · 3 comments
Open

Question about Koan 14 - DotNetCollections #83

MortalFlesh opened this issue Nov 27, 2018 · 3 comments

Comments

@MortalFlesh
Copy link

Hello,

first let me thank you for this great project :)

I'm curious about SkippingElements Koan, because there is IMHO quite complicated expectation - at least for beginers I guess.

let SkippingElements() =
    let original = [0..5]
    let result = Seq.skip 2 original
    
    AssertEquality result __

since there is Seq.skip it changes from int list to seq<int> and there is none example before, how you can create a sequence from numbers, to match the signature and the values.

I know there is planty of ways of passing this test

seq {2..5}
[2..5] |> List.toSeq

and more ...

So I just want to ask if it is a mistake and it should have been List.skip, which would be much easier for beginners - result would be just [2;3;4;5] or it is on purpose and you must think about casting types (from list to seq).

@paulhey
Copy link

paulhey commented Mar 9, 2019

I'm having a slight issue with this as well as sequences are not properly fleshed out prior to this koan.
In order to pass it using dotnet core 2.2.104, I do:
__ --> (seq{2..5})

@sporifolous
Copy link

As a beginner, this Koan was impossible to solve with the tools provided by previous Koans. Would be cool to get a lesson on creating seq, or a hint that you can convert arrays into them.

@CailleauThierry
Copy link

So this solution also work:

AssertEquality result (seq[2..5])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants