New answers tagged

2

I think that regardless of a language you're using the most idiomatic way would be to take advantage of InlineData attribute It would look roughly like this [<Theory>] [<InlineData("DSXLAD46", "expectedbic1")>] [<InlineData("KAOLADZOAQC", "expectedbic2")>] let ``Bics should be valid with SEPA-compliant countries`` input output = let ...


2

I'm not very experienced with EF, to me your code looks fine but there are some details you can improve as stated in the other answer, and of course other ways of writing the same which I will show you, just to illustrate, not to say it's the way to go: module Rm.Iban.Domain.IbanValidation open System open System.Text.RegularExpressions open FSharpPlus ...


2

Not a thorough review, but two things jump out at me as problematic with ImmutableQueue: Your Reverse method looks wrong: it doesn't do anything if front isn't empty, and doesn't reverse if it isn't. I would have expected: let reverse () = ImmutableQueue(rear, front) There are no tests for this method. Some of the methods of ImmutableQueue seem to ...


2

Big Issue You have a problem with empty Tries: toSeq thinks they contain one element: it returns seq { 0 } for an empty Trie. Seq.length (BitTrie.toSeq (BitTrie.create ())) = 1 This 0 value then goes away when you add anything. I think create should probably be producing a NullTrie. There's also no need for it to be a method; I'd prefer an empty value, ...


4

I can't say much about the Async behavior of your solution, because I'm not that used to deal with asynchronous programming in F#, but at first sight it looks alright. Instead I'll concentrate on some other aspects. let digitalIban = let rearrangedIban = iban.Substring(4) + iban.Substring(0,4) let replaceBase36LetterWithBase10String (s: ...


Top 50 recent answers are included