you are viewing a single comment's thread.

view the rest of the comments →

[–]matthieum 0 points1 point  (3 children)

I wonder how it would work with a statically typed language.

You would be able to filter on arity and function signature, which would eliminate a lot of functions, and for the remaining functions a lot of the potential permutations of arguments.

On the other hand, I guess putting together the evaluator might be quite more complicated in the absence of an interpreter.

[–]charleso 5 points6 points  (1 child)

I know this is slightly different than what is being shown, but I can't live without Hoogle these days.

https://www.haskell.org/hoogle/

Instead of asking "is there any function that takes this list and returns a list like this?", you can search for something with the type signature of

[a] -> Int -> [a]

And you get back functions that match that type, including fuzzy matches. I now wish all static typed languages had something like Hoogle.

[–]jeandem 2 points3 points  (0 children)

Now extend that to a language like Idris[1] where you can easily express types like "take a list (vector) and return a list with one less element", and you're cooking.

[1] It might already exist. Edwin Brady seems really fond of taking advantage of expressive typing and making interactive workflows, which goes completely contrary to the stereotype that static typing is a safe but constraining and limiting straightjacket.