Re: Is there a better way to do this
Hi Konrad, > (let (Line NIL End (chop Mark) Body (cons 'prog B)) > ... >(eval Body))) > but have a feeling it could be expressed more gracefully in Picolisp. Yes. There is a direct way using 'run' which makes the additional (cons 'prog ..) unnecessary: (de process-until (Mark . B) (let (Line NIL End (chop Mark)) (until (or (eof) (= Line End)) (setq Line (line)) (run B) ) ) ) Cheers, - Alex -- UNSUBSCRIBE: mailto:[EMAIL PROTECTED]
Is there a better way to do this
Hi, I'm writing a method wich only wants to conditionally process some of its arguments and am wondering if there is a better way to write it. Note In this case I don't need somthing which returns new functions as each invocation will only be used once. currently I have (de process-until (Mark . B) (let (Line NIL End (chop Mark) Body (cons 'prog B)) (until (or (eof) (= Line End)) (setq Line (line)) (eval Body))) and intended to be called as follows (in 'stream (process-until "End First Section" (Fun1 Line) (Fun2 Line)) (process-until "End Second Section" (DIferentFun Line))) What I have at the moment works (I'm not at my regular computer so I hope I retyped it correctly) but have a feeling it could be expressed more gracefully in Picolisp. regard Konrad. -- UNSUBSCRIBE: mailto:[EMAIL PROTECTED]