Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
ok.
could you change the initial code to something like:
?
Please review and approvew when possible.
Wow this is beautiful. I really enjoy this approach, I didn't even think to do it this way.
removed.
Seems like you don't need to
open System
in the solution and setup.I believe I had answered your questions, please let me know if something else needs to change.
Thanks.
Module name ExampleKata is just some placeholder, example name, and maybe for the kata something better could be used? I have no good idea what, but for example in Java the wrapper class is
class Java
(yuck), and in C# it'sclass Kata
The solution setup defines function
add
- is there a reason why users are initially provided with a totally unrelated function?In
TestOne
, some calls to user solution are with parens, and some are without. Is there a reason for mixing the styles?Please consider assertion messages to point users what potential problems with their solution can be (https://github.com/hobovsky/katasniplib/blob/main/content/snippets/poly_0002/snippet_0003.md)
IIRC,
int list
is preferred in F# overList<int>
?I am not exactly sure what this generator is meant to do:
MAybe just List.init would do the job?
Hey this ready now for review and approval.
I can get things to work with F# 4.0 not 6.0, I'm going to update this to be correct.
So please give me some time, yes it's simple problem, I'm just using this an exercise for remembering how to do translations again.
It's been a while for me.
Where did you find this character?!
OMG. I was trying the same thing but thought that such a character did not exist!
I searched for a char Representation for EQN all over ...so thats it haha
Looking at your function I would expect the result to be ending with a whitespace, what Am I missing here? You join every line with an ending line switch, also the last line where we dont want a line switch anymore right?
So I would expect line 10 to have an ending line switch in your solution but there is none. Thats so confusing to me. I personally didnt use the -join option but used a different approach and there I had to use an if statement to see if its the last line, to only add a line switch when its not the last line. Or I could simply remove the last one with the Replace method but its so weird to me that you dont have to do any of that here. Why does the output from your solution NOT have a line switch after line 10??? someone please explain
Edit: I just found out how it works. For those who struggle understanding this solution: Google how the join method actually works in the background. Cuz I thought it would append every line but it does not. Its rather defining a seperator for the join. So the line switch only occurs in between two lines.
If you know wichs are the primes number, then I don't know is this answer has sense for you.
Loading more items...