Re: list merge help

2009-01-11 Thread e
ahhh I see. That makes sense. So it's not like procedural programming. You could see what I was trying to understand. I didn't want case/swtich semantics. like the (cond) or if, else if style. I was trying to return at the first true thing, but it doesn't work like that. it always gets

Re: list merge help

2009-01-11 Thread Eric Lavigne
> > > this seemed like a clean, nice way to merge to sorted lists into one > sorted list. I'm not getting clojure syntax, it seems: > > > (defn listmerge [l1 l2] > (let [l1first (first l1) l2first (first l2)] >(if (= l1first nil) l2) >(if (= l2first nil) l1) >(if (< l1first l2first) >

Re: list merge help

2009-01-11 Thread James Reeves
On Jan 11, 5:53 pm, e wrote: > this seemed like a clean, nice way to merge to sorted lists into one > sorted list.  I'm not getting clojure syntax, it seems: > > (defn listmerge [l1 l2] >   (let [l1first (first l1) l2first (first l2)] >     (if (= l1first nil) l2) >     (if (= l2first nil) l1) >

list merge help

2009-01-11 Thread e
this seemed like a clean, nice way to merge to sorted lists into one sorted list. I'm not getting clojure syntax, it seems: (defn listmerge [l1 l2] (let [l1first (first l1) l2first (first l2)] (if (= l1first nil) l2) (if (= l2first nil) l1) (if (< l1first l2first) (cons l1fi