fsharp icon indicating copy to clipboard operation
fsharp copied to clipboard

Exercise: Binary Search

Open CodeMan99 opened this issue 3 years ago • 2 comments

For the Binary Search exercise, there is nothing to prevent an implementation using Array.tryFindIndex. So this implementation is accepted.

module BinarySearch

let find input value = Array.tryFindIndex ((=) value) input

This is probably not the goal of the exercise and should probably be rejected. Or, at least, a mention in description of the exercise to avoid that specific helper (similar to the Accumulate exercise).

CodeMan99 avatar Aug 26 '22 17:08 CodeMan99

Good idea. The way to have it be mentioned in the description is to add a .docs/instructions.append.md file to the exercise's directory. Like https://github.com/exercism/fsharp/blob/main/exercises/practice/accumulate/.docs/instructions.append.md

Would you be willing to submit a PR?

ErikSchierboom avatar Aug 30 '22 05:08 ErikSchierboom

Would you be willing to submit a PR?

Sure thing. Wanted to make sure I was at least strolling down the right avenue 😀

CodeMan99 avatar Aug 30 '22 06:08 CodeMan99

PR #1094 was merged. Closing.

CodeMan99 avatar Oct 05 '22 01:10 CodeMan99