News for hackers. Stuff that matters.
Re:Amb by unhammer on Saturday February 22, 2020 @03:16AM (#22389960)
The C# one must be trolling
Re:Amb by rpeden on Saturday February 22, 2020 @12:40PM (#22392201)
The first two C# solutions come closer to actually implementing Amb, though.

The Purebasic solution depends on the operands being strings, and the F# solution depends on them being sequences. And the way that the 'Ambassert' works in both of them is hardcoded, too.

Since the problem was 'create an Amb implementation and demonstrate it using the data below' and not 'create an Amb-like thing that can only solve for cases where the operands are strings/sequence and the last item in operand 1 must match the first item in operand 2', I believe that the C# solutions actually solve the problem, while the Purebasic and F# solutions do not.

Re:Amb by tigershark on Saturday February 22, 2020 @11:16PM (#22395111)
The C# classes solutions are doing the same thing as the F# solution, but in a more complicated way. You don’t really need the Amb operator to solve that problem using the list monad or list comprehension or doing a join. I’ve never seen anyone complain that you should have an Amb operator in SQL when you are doing a JOIN.