Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
various eval functions and macros for use with clojure
Clojure Ruby
branch: master
Failed to load latest commit information.
src/evalive
test/evalive/test
.gitignore
README.md
project.clj
watching.rb

README.md

evalive

various eval functions for Clojure

documentation

evalive

Examples

    (use '[evalive.core :only (evil destro wtfn)])

evil

    (evil '{message "Hello", place "Cleveland"}
          '(println message place))

    ; Hello Cleveland

destro

    (destro [message place] ["Hello" "Cleveland"])
    ;=> {vec__2438 [Hello Cleveland], message Hello, place Cleveland}

evil destro

    (evil (destro [message place] ["Hello" "Cleveland"])
          '(println message place))

    ; Hello Cleveland

wtfn

    (def callable-and (wtf clojure.core.and))

    (callable-and true 1 2 3 {} true 42)
    ;=> 42

wtfn destro

    (def destruction (wtfn destro))

    (map #(apply destruction %)
           [['[h & t] [1 2 3 4 5]]
            ['[car cdr] [:first :rest]]
            ['[a b [c d & e] :as Z] [1 2 [3 4 5 6 7 8]]]])

    ;=> ({vec__2220 [1 2 3 4 5], h 1, t (2 3 4 5)}
         {vec__2223 [:first :rest], car :first, cdr :rest}
         {vec__2226 [1 2 [3 4 5 6 7 8]],
          a 1,
          b 2,
          vec__2227 [3 4 5 6 7 8],
          c 3,
          d 4,
          e (5 6 7 8),
          Z [1 2 [3 4 5 6 7 8]]})

Including

Leiningen

Modify your Leiningen dependencies to include evalive:

:dependencies [[evalive "1.1.0"] ...]    

Maven

Add the following to your pom.xml file:

<dependency>
  <groupId>evalive</groupId>
  <artifactId>evalive</artifactId>
  <version>1.1.0</version>
</dependency>

References

License

Copyright (C) 2011-2013 Fogus

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

Something went wrong with that request. Please try again.