This looks nice but requires more hand-indenting, right? I really like
being able to select a block in emacs and hit indent-region and get
predictably tidy code. (The failure of emacs to do this 100% with
scala code is a pet peeve).

On Jun 22, 1:50 pm, Michael Gardner <gardne...@gmail.com> wrote:
> Try this:
>
> (defn compare-row [a b]
>   ;; compare null rows as > to advance cursor
>   (cond
>     (and (nil? a) (nil? b))
>       [0,0]
>     (and (nil? a) (not= b nil))
>       [1, 0]
>     (and (not= a nil) (nil? b))
>       [-1, 0]
>     true
>       (loop [col 0 a a b b]
>          (let [cmp (compare-fields (first a) (first b))]
>            (if (and (< col (count a)) (= cmp 0))
>              (recur (+ 1 col) (rest a) (rest b))
>              [cmp,col])))))

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to