Skip to content

fogus/evalive

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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.

About

various eval functions and macros for use with clojure. a code riff.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published