AOT Error

2012-02-16 Thread Eric Fong
1. create a new leinigen project: lein new foo 2. modify foo.core.clj as follow: (ns foo.core) (defn format [] 1) 3. modify project.clj, add foo.core to aot: (defproject foo "1.0.0-SNAPSHOT" :description "FIXME: write description" :dependencies [[org.clojure/clojure "1.3.0"]] :aot [fo

Re: A Bug of map function?

2012-02-16 Thread Eric Fong
That's the point. Empty lazy sequence doesn't work, but not empty lazy sequence works. On 2月15日, 上午9时44分, Armando Blancas wrote: > eval doesn't mind lazy seqs as input: > > user=> (map identity ['quote ()]) > (quote ()) > user=> (class (map identity ['quote ()])) > clojure.lang.LazySeq > user=> (

Re: A Bug of map function?

2012-02-14 Thread Eric Fong
;s caused > byhttps://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/C... > - it should probably be testing for ISeq, not IPersistentList. > > On Feb 13, 1:02 am, Eric Fong wrote: > > > > > > > > > => (eval `'~(map identity [1 2 3])) > &g

A Bug of map function?

2012-02-13 Thread Eric Fong
=> (eval `'~(map identity [1 2 3])) (1 2 3) => (eval `'~(map identity ())) CompilerException java.lang.UnsupportedOperationException: Unknown Collection type, compiling:(NO_SOURCE_PATH:135) => (eval `'~(map identity nil)) CompilerException java.lang.UnsupportedOperationException: Unknown Collecti

replace-first bug in clojure.string ?

2012-01-13 Thread Eric Fong
Clojure> (require '(clojure [string :as string])) nil Clojure> (string/replace-first "a" #"b" "c") "a" Clojure> (string/replace-first "a" #"b" (comp str last)) nil when pass a pattern and a function to the replace-first function, and the pattern doesn't match the string (first argument), replace-f