Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Finding functions, because they're sexy.

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 src
Octocat-spinner-32 test
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .travis.yml
Octocat-spinner-32 README.md
Octocat-spinner-32 example.policy
Octocat-spinner-32 project.clj
README.md

findfn

This thing can help you find other things!

Basically, what it does is take input arguments and an expected output, and it tries out every function and macro in a set of namespaces, collecting the names of the ones that produce the output for the input arguments passed. Here are some examples:

user=> (use 'findfn.core)
nil
user=> (use '[clojail.testers :only [secure-tester] :rename {secure-tester tester}])
nil
user=> (find-fn tester 6 3 3) ; 6 is the expected output and the 3s are the input
(clojure.core/+ clojure.core/unchecked-add clojure.core/+' clojure.core/unchecked-add-int)
user=> (find-arg tester [2 3 4] map '% [1 2 3]) ; Finds a function to pass to a higher order function
(clojure.core/unchecked-inc-int clojure.core/unchecked-inc clojure.core/inc clojure.core/inc')

Usage

[findfn "0.1.0"]

License

Copyright (C) 2011 Joshua Cole, Alan Malloy, Anthony Grimes

Distributed under the Eclipse Public License, the same as Clojure.

Something went wrong with that request. Please try again.