borkdude / re-find.web

Web version of re-find
https://borkdude.github.io/re-find.web
Eclipse Public License 1.0
25 stars 4 forks source link

Doesn't find reverse function #93

Closed jeshan closed 5 years ago

jeshan commented 5 years ago

I'm trying the following inputs in repl.it:

Args: '(1 2 3) Returns: '(3 2 1)

or: Args: (list 1 2 3) Returns: (list 3 2 1)

I was expecting it to find the reverse function. Instead it may or may not find the shuffle function (since shuffle is not idempotent)

Example link: https://re-find.it/?args=%27%281%202%203%29&ret=%27%283%202%201%29&more=true

It does not look like expected behaviour

jeshan commented 5 years ago

It's probably more of a bug in the speculative library.

borkdude commented 5 years ago

@jeshan Thanks for posting this issue. It's fixed now by adding a spec for it:

https://re-find.it/?args=%27%281%202%203%29&ret=%27%283%202%201%29&more=true

borkdude commented 5 years ago

Fixed with https://github.com/borkdude/re-find.web/commit/419111ad3ae7ccb7860f26caa3a0401c1cde8674

borkdude commented 5 years ago

Note to self and others: you can find a list of all available specs by executing this in the console:

cljs.core.clj__GT_js(cljs.spec.test.alpha.instrumentable_syms())

It's a bit cumbersome, but it might help explain why something isn't working.

jeshan commented 5 years ago

Thanks, I should have paid more attention to this: image image